I have installed Postfix, I can send mails between local users as expected, but I would try to limit the access of a particular user to the server. I edited the /etc/postfix/access file in this way:diego@example.com REJECTwhere example.com is $mydomain. I did also a postmap access to generate the validate file. Strangely, I can still send mail from the diego account using mutt. Here the maillog:Jan 22 15:46:36 server postfix/pickup[6637]: 62117BF647: uid=500 from=<diego>Jan 22 15:46:36 server postfix/cleanup[6737]: 62117BF647: message-id=<20140122144636.GA6732@server.example.com>Jan 22 15:46:36 server postfix/qmgr[6638]: 62117BF647: from=<diego@example.com>, size=422, nrcpt=1 (queue active)Jan 22 15:46:36 server postfix/local[6739]: 62117BF647: to=<localuser@server.example.com>, relay=local, delay=0.07, delays=0.06/0.02/0/0, dsn=2.0.0, status=sent (delivered to mailbox)Jan 22 15:46:36 server postfix/qmgr[6638]: 62117BF647: removed
Why access file is being ignored by Postfix?
email;postfix
I found finally the correct sintax. If you want to just block a user, you have to edit the main.cf file in this way:smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/accessand in the access file:user@                        REJECTotheruser@server.example.com REJECT #this will REJECT only if sender is from server.example.com domain