Prev: Conoces a VICTORY TELECOM?
Next: Debian's sendmail
From: C.Phillips on 24 Feb 2010 17:38 We have sendmail configured to pipe all messages to a PHP script. The issue is that when multiple addresses are BCC'd at the same domain the headers do not contain any reference to the address to which the message should be delivered. Normally sendmail would simply write the message to the correct inbox, but since the inbox is a program we need the program to identify which address sendmail would have normally delivered to. For example, BCCing email_1(a)domain.com and email_2(a)domain.com will not contain a reference to either address in the message source. However, BCCing only email_1(a)domain.com will contain email_1(a)domain.com in the "ApparentlyTo" header. Is there a flag or configuration setting to have sendmail identify the address that the message should be delivered to when it is piped into the PHP script? For example, assuming sendmail receives a message BCC'd to email_1(a)domain.com and email_2(a)domain.com and pipes that message to pipe.php, can sendmail notify the script (either as a parameter in standard input or as part of the message source) of the address when it pipes the message source to the script? Thanks
From: ska on 25 Feb 2010 04:45 C.Phillips wrote: > pipe.php, can sendmail notify the script (either as a parameter in > standard input or as part of the message source) of the address when > it pipes the message source to the script? It looks like the message to two recipients is drop just once. In this case only LMTP would receive all the recipients, IMHO. It's the "z" mailer flag. If your script is used as MDA/LDA once for each recipient, you can use the macro $u when you invoke your script. -ska
From: C.Phillips on 25 Feb 2010 11:58 On Feb 25, 1:45 am, ska <s...(a)mail.inf.fh-brs.de> wrote: > > It looks like the message to two recipients is drop just once. In this > case only LMTP would receive all the recipients, IMHO. It's the "z" > mailer flag. > > If your script is used as MDA/LDA once for each recipient, you can use > the macro $u when you invoke your script. > > -ska Thanks ska, Is it your opinion that sendmail does not know the true recipients when it receives the message, and that only the LMTP knows? What we have is a 'catchall' set up so that all mail delivered to the domain is piped into pipe.php by sendmail. pipe.php then reads the message from standard input. Is it possible to set up an entry in / etc/mail/sendmail.mc (or /etc/mail/sendmail.cf) to signal sendmail to identify the true recipient? Thanks, C. P.S. I don't see a "z" flag in man sendmail (version 8)
From: Andrzej Adam Filip on 25 Feb 2010 13:48 "C.Phillips" <zippidyzap(a)gmail.com> wrote: > We have sendmail configured to pipe all messages to a PHP script. *HOW* have you done it? There are may ways to do it, you want to improve your current choice. > The issue is that when multiple addresses are BCC'd at the same domain the > headers do not contain any reference to the address to which the > message should be delivered. Normally sendmail would simply write the > message to the correct inbox, but since the inbox is a program we need > the program to identify which address sendmail would have normally > delivered to. > > For example, BCCing email_1(a)domain.com and email_2(a)domain.com will not > contain a reference to either address in the message source. However, > BCCing only email_1(a)domain.com will contain email_1(a)domain.com in the > "ApparentlyTo" header. > > Is there a flag or configuration setting to have sendmail identify the > address that the message should be delivered to when it is piped into > the PHP script? > > For example, assuming sendmail receives a message BCC'd to > email_1(a)domain.com and email_2(a)domain.com and pipes that message to > pipe.php, can sendmail notify the script (either as a parameter in > standard input or as part of the message source) of the address when > it pipes the message source to the script? What you want can be done by using/defining new mailer in sendmail.cf and configuring sendmail to deliver messages via the mailer. You may try (first?) using procmail mailer with procmail scripts in /etc/procmailrcs/. You can add "m" flag to procmail mailer if you do not want one recipient per one procmail script execution. -- [pl>en Andrew] Andrzej Adam Filip : anfi(a)onet.eu : Andrzej.Filip(a)gmail.com Open-Sendmail: http://open-sendmail.sourceforge.net/ Perl programming is an *empirical* science! -- Larry Wall in <10226(a)jpl-devvax.JPL.NASA.GOV>
|
Pages: 1 Prev: Conoces a VICTORY TELECOM? Next: Debian's sendmail |