# exim: Permission denied: creating lock file hitching post

## doublehp

```
Jun  4 06:18:21 mercure exim[14708]: 2005-06-04 06:18:21 1DeQGf-0008K2-KN == dhp@localhost R=localuser T=local_delivery defer (13): Permission denied: creating lock file hitching post /var/mail/dhp.lock.localhost.42a1399d.00003979 (euid=1000 egid=100)
```

```
$ ls -lh /var/mail/ -a

total 0

drwxrwxr-x  2 mail mail 18 May  5 09:24 .

drwxr-xr-x  7 root root 74 Jun  4 05:27 ..

-rw-r--r--  1 root root  0 May  5 09:24 .keep
```

```
# ps aux | grep exim

mail     18862  0.0  0.3   8152  2320 ?        Ss   06:12   0:00 /usr/sbin/exim -bd -q15m[list=]
```

whats wrong there ?

I just want local delivery, so that cron can mail my user, and occasional forward for outgoing emails, but only from localhost, and only relay for my 2 domains demaine.info and doublehp.org, so that mutt or Firefox can send messages when the SMTP of my provider is down, or unreachable.[/list]

cat /etc/exim/exim.conf | grep -v "^#" | grep -v "  #" | uniq

```
log_file_path=syslog

domainlist local_domains = @

domainlist relay_to_domains = *.demaine.info *.doublehp.org

hostlist   relay_from_hosts = 127.0.0.1

acl_smtp_rcpt = acl_check_rcpt

never_users = root

host_lookup = *

rfc1413_hosts = *

rfc1413_query_timeout = 30s

ignore_bounce_errors_after = 2d

timeout_frozen_after = 7d

begin acl

acl_check_rcpt:

  accept  hosts = :

  deny    message       = Restricted characters in address

          domains       = +local_domains

          local_parts   = ^[.] : ^.*[@%!/|]

  deny    message       = Restricted characters in address

          domains       = !+local_domains

          local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./

  accept  local_parts   = postmaster

          domains       = +local_domains

  require verify        = sender

  accept  domains       = +local_domains

          endpass

          verify        = recipient

  accept  domains       = +relay_to_domains

          endpass

          verify        = recipient

  accept  hosts         = +relay_from_hosts

  accept  authenticated = *

  deny    message       = relay not permitted

begin routers

dnslookup:

  driver = dnslookup

  domains = ! +local_domains

  transport = remote_smtp

  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8

  no_more

system_aliases:

  driver = redirect

  allow_fail

  allow_defer

  data = ${lookup{$local_part}lsearch{/etc/mail/aliases}}

  file_transport = address_file

  pipe_transport = address_pipe

userforward:

  driver = redirect

  check_local_user

  file = $home/.forward

  no_verify

  no_expn

  check_ancestor

  file_transport = address_file

  pipe_transport = address_pipe

  reply_transport = address_reply

localuser:

  driver = accept

  check_local_user

  transport = local_delivery

  cannot_route_message = Unknown user

begin transports

remote_smtp:

  driver = smtp

local_delivery:

  driver = appendfile

  file = /var/mail/$local_part

  delivery_date_add

  envelope_to_add

  return_path_add

address_pipe:

  driver = pipe

  return_output

address_file:

  driver = appendfile

  delivery_date_add

  envelope_to_add

  return_path_add

address_reply:

  driver = autoreply

begin retry

*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h

begin rewrite

begin authenticators
```

----------

## doublehp

https://bugs.gentoo.org/show_bug.cgi?id=88177

say to

chmod 1777 /var/mail

it works, but I really think it is NOT a good and secure fix.

----------

## radio_flyer

[quote="doublehp"]

```
Jun  4 06:18:21 mercure exim[14708]: 2005-06-04 06:18:21 1DeQGf-0008K2-KN == dhp@localhost R=localuser T=local_delivery defer (13): Permission denied: creating lock file hitching post /var/mail/dhp.lock.localhost.42a1399d.00003979 (euid=1000 egid=100)
```

See Q0036 in the FAQs at http://www.exim.org. The fix is to uncomment two lines that

appear in the exim.conf file:

     group = mail

     mode = 0660

Exim runs as the user being mailed to. By default the /var/mail directory is set to user root,

group mail. This allows exim to create local user spool files in the mail group.

----------

