1

when sending mail through Sendmail an error is displayed:

vectortrade sm-mta[16951]: NOQUEUE: SYSERR(root): hash map "access": unsafe map file /etc/mail/access.db: Permission denied

what rights should be? Now we set the following:

root@a:/etc/mail# ls -la
total 232
drw---S---  7 smmta smmsp  4096 Mar 22 06:10 .
drwxr-xr-x 89 root  root   4096 Mar 22 09:11 ..
-rw-------  1 root  root   4261 Mar 22 03:16 access
-rwx-wx--x  1 root  root  12288 Mar 22 03:16 access.db
-rw-r--r--  1 root  root    281 Feb 11  2014 address.resolve
lrwxrwxrwx  1 root  smmsp    10 Feb  7 04:30 aliases -> ../aliases
-rw-r-----  1 root  smmsp 12288 Mar 22 03:16 aliases.db
-rw-r--r--  1 root  smmsp  3218 Mar 22 05:25 databases
-rw-------  1 root  root    826 Mar 22 06:04 dkim.key
-rw-r--r--  1 root  root   5657 Feb 11  2014 helpfile
-rw-r--r--  1 root  smmsp    47 Mar 22 04:12 local-host-names
drwxr-sr-x  2 smmta smmsp  4096 Feb  7 04:30 m4
-rwxr-xr--  1 root  smmsp  9994 Mar 22 05:25 Makefile
drwxr-xr-x  2 root  root   4096 Feb  7 04:30 peers
drwxr-xr-x  2 root  smmsp  4096 Feb 11  2014 sasl
-rw-r--r--  1 root  smmsp 60131 Mar 22 05:25 sendmail.cf
-rw-r--r--  1 root  root  12236 Mar 22 03:16 sendmail.conf
-rw-r--r--  1 root  smmsp  4218 Mar 22 05:23 sendmail.mc
-rw-r--r--  1 root  root    149 Feb 11  2014 service.switch
-rw-r--r--  1 root  root    180 Feb 11  2014 ervice.switch-nodns
drwxr-sr-x  2 smmta smmsp  4096 Feb  7 04:30 smrsh
-rw-r--r--  1 root  smmsp 44049 Mar 22 03:16 submit.cf
-rw-r--r--  1 root  smmsp  2383 Mar 22 03:16 submit.mc
drwxr-xr-x  2 smmta smmsp  4096 Feb  7 04:30 tls
-rw-r--r--  1 root  smmsp     0 Feb  7 04:30 trusted-users

Help me to understand. It happened after a set DKIM.

1 Answer 1

1

The error you are facing is:

hash map "access": unsafe map file /etc/mail/access.db

means that sendmail identify potential security issue with the permission access to the file/folder. i.e. non-root user might be able to use it in order to gain root permission.

Limiting access to the file/folder to root only:

  • The file access.db is writeable to both user root and group root.

The following will allow writing to this file only by root and not by group root and will make this file safer (as only root account will be able to write to this file)

sudo chmod g-w /etc/mail/access.db
  • according to this old book /etc/mail directory should be owner by root.

In your case, the directory is owner by non root user.

Updating /etc/mail permissions to be owned by root:

sudo chown root /etc/mail

Updating /etc/mail permissions to be read/write by root only:

sudo chmod 711 /etc/mail
5
  • i called command sudo chmod g-w /etc/mail/access.db but get again error: Mar 22 11:39:03 vectortrade sm-mta[18713]: NOQUEUE: SYSERR(root): hash map "access": unsafe map file /etc/mail/access.db: Permission denied Commented Mar 22, 2017 at 15:43
  • @StefanHansch -I've edited my answer
    – Yaron
    Commented Mar 22, 2017 at 15:52
  • thank you. but again same error, o my god! Mar 22 11:52:50 vectortrade sm-mta[19331]: NOQUEUE: SYSERR(root): hash map "access": unsafe map file /etc/mail/access.db: Permission denied Mar 22 11:52:50 vectortrade sm-mta[19331]: ruleset=check_relay, arg1=localhost.localdomain, arg2=127.0.0.1, relay=localhost.localdomain [127.0.0.1], reject=451 4.3.0 Temporary system failure. Please try again later. Commented Mar 22, 2017 at 15:55
  • @StefanHansch I'm sorry that it didn't work :( two last ideas.... 1) sudo chmod 711 /etc/mail and 2) restart sendmail
    – Yaron
    Commented Mar 22, 2017 at 16:00
  • yes. with sudo chmod 711 /etc/mail work. Thank you. Commented Mar 22, 2017 at 16:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .