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]:  |  | us...@example2.com
====== 2016/03/07 13:20:15 ======
[PM]:  | us...@example2.com
====== 2016/03/07 13:20:15 ======
[FOUND VACATION]:  |  | u...@example.com | us...@example2.com |
us...@example2.com
====== 2016/03/07 13:20:15 ======
[SEND RESPONSE] for :
 | FROM: us...@example2.com (orig_to: us...@example2.com)
 | TO: u...@example.com
 | 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: us...@example2.com
Subject: test vac
FAILED To: u...@example.com (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!

Reply via email to