I'm running Postfix 2.11.1 and i've configured an autoresponder by
adding those lines to postfix's master.cf
postfix_response unix - n n - - pipe
flags=Rq user=postfix_response
argv=/var/spool/postfix_response/vacation.pl -f ${sender} --
${recipient}
the problem is the vacation.pl script isn't authenticating against
postfix when trying to send the email via sendmail and as these are my
requirements
smtpd_relay_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
when the scripts tries to autorespond it gets:
====== 2016/03/07 13:20:15 ======
[STRIP RECIPIENTS]: | | [email protected]
====== 2016/03/07 13:20:15 ======
[PM]: | [email protected]
====== 2016/03/07 13:20:15 ======
[FOUND VACATION]: | | [email protected] | [email protected] |
[email protected]
====== 2016/03/07 13:20:15 ======
[SEND RESPONSE] for :
| FROM: [email protected] (orig_to: [email protected])
| TO: [email protected]
| VACATION SUBJECT: test vac
| VACATION BODY: test vac
====== 2016/03/07 13:20:16 ======
Mail::Sendmail said :Mail::Sendmail v. 0.79_16 - Mon Mar 7 13:20:15 2016
Date: Mon, 7 Mar 2016 13:20:15 +0100
Server: localhost Port: 25
From: [email protected]
Subject: test vac
FAILED To: [email protected] (554 5.7.1 : Relay access denied)
The question is, does any one how should i proceed in order to let the
script authenticate while trying to respond? The ideal would be to
authenticate using the from email address but for privacy matters
there's no access to that password. Does any one know how should i
proceed?
If i create a specific virtual user to send autoresponse emails then
this user email address needs to be used in the from field as this is
a restriction requirement so no one can send emails on behalf of other
users:
smtpd_sender_restrictions =
...
...
reject_authenticated_sender_login_mismatch,
Thanks!