Re: [Zope] dtml-sendmail and envelop sender [Q]
Bruno Mattarollo writes:
... We need this email to display the FROM header as from the user that filled in the form, so we use to have something like this: <dtml-sendmail MailHost=3D"<our mailhost>"> From: <dtml-var SenderFromForm> To: <dtml-var EmailOfYourCongresMan> =2E.. and so on ...
But the issue is if by any of this bad things of life, the email of the con= gresman is down the bounce will go the the cyberactivist email account (SenderFromF= orm)! The Internet mail message specification (RFC 822) defined a header to control error reports. I think, it is "Error-To", but I am not sure. Please check the spec.
Dieter
The Internet mail message specification (RFC 822) defined a header to control error reports.
That's wrong. Errors go to the envelope sender. There are many, many bad gateways that do it wrong but there number still doesn't make it right.
I think, it is "Error-To", but I am not sure. Please check the spec.
Errors-To is a deprecated sendmail hack. It is not recommended to use it. It stems from the old days where gateways had no idea about envelopes. To answer the original question: dtml-sendmail is as limited as most other scripts that are used to send mail from forms. The best would be to use an external Python script that accepts parameters for the envelope. Regards, Frank
Hi, could anyone tell me how to copy and paste objects with dtml? Thank you, Marc
On Mon, Mar 19, 2001 at 12:25:12PM +0100, Frank Tegtmeyer wrote:
I think, it is "Error-To", but I am not sure. Please check the spec.
Errors-To is a deprecated sendmail hack. It is not recommended to use it. It stems from the old days where gateways had no idea about envelopes.
To answer the original question: dtml-sendmail is as limited as most other scripts that are used to send mail from forms. The best would be to use an external Python script that accepts parameters for the envelope.
I have just found a tip to try and use the 'Sender:' header as well. But managing the envelope is your best bet. Errors-To and Return-Path are hacks (although I just noticed that MailMan uses these headers as well.) -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
I have just found a tip to try and use the 'Sender:' header as well. The Sender:-header has nothing to do with the envelope.
managing the envelope is your best bet. Errors-To and Return-Path are hacks (although I just noticed that MailMan uses these headers as well.)
Return-Path: SHOULD be the envelope sender address. To use Errors-To as a last fallback is of course possible although it keeps this thing artificially alive. Regards, Frank
Hi First of all, thanks to everyone that is helping in this issue! I have been looking again and again at the specs and I found this in the RFC 822: <!--StartFragment--> 4.4.4. AUTOMATIC USE OF FROM / SENDER / REPLY-TO For systems which automatically generate address lists for replies to messages, the following recommendations are made: o The "Sender" field mailbox should be sent notices of any problems in transport or delivery of the original messages. If there is no "Sender" field, then the "From" field mailbox should be used. o The "Sender" field mailbox should NEVER be used automatically, in a recipient's reply message. <!--EndFragment--> So according to the spec I should use "Sender: <dtml-var OurBounceProcessingAccount>" in our DTML-Method that uses dtml-sendmail, no? I mentionned the envelope-sender because in the postfix mailing list, when I asked to whom the message will bounce, I got the answer "to the envelope-sender"... So all this is about how to set up the envelope-sender using Zope and postfix... I see that Sender is not related to the envelope-sender ... Is the envelope-sender then the user that is passed to postfix when doing the SMTP connection and giving the mail from: command? Maybe my mistake is in the term "envelope-sender"? Cheers and thanks again! /B ----- Original Message ----- From: "Frank Tegtmeyer" <frank.tegtmeyer@cia-mediahaus.de> To: <zope@zope.org> Sent: Monday, March 19, 2001 4:31 PM Subject: Re: [Zope] dtml-sendmail and envelop sender [Q]
I have just found a tip to try and use the 'Sender:' header as well. The Sender:-header has nothing to do with the envelope.
managing the envelope is your best bet. Errors-To and Return-Path are hacks (although I just noticed that MailMan uses these headers as well.)
Return-Path: SHOULD be the envelope sender address. To use Errors-To as a last fallback is of course possible although it keeps this thing artificially alive.
Regards, Frank
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
4.4.4. AUTOMATIC USE OF FROM / SENDER / REPLY-TO
For systems which automatically generate address lists for replies to messages, the following recommendations are made:
This relates to automates like autoresponders (vacation mail etc) that process the mail at it's destination. The envelope sender may not available there. All MTA's (qmail, postfix, exim, sendmail, smail, ...) that transport the mail (MTA = mail transport agent) nearer to it's final destination bounce undeliverable messages to the envelope sender.
So according to the spec I should use "Sender: <dtml-var OurBounceProcessingAccount>" in our DTML-Method that uses dtml-sendmail, no?
To handle autoresponders etc. that's ok. It doesn't handle delivery failures. You HAVE TO set the envelope sender accordingly (I think for Postfix it's the -f switch like for sendmail). To do that you have to generate a new method - possibly as external Python method.
envelope-sender ... Is the envelope-sender then the user that is passed to postfix when doing the SMTP connection and giving the mail from: command? Exactly that is the envelope sender.
Maybe my mistake is in the term "envelope-sender"? Maybe you confuse heders and envelope in general (don't worry, that's common). To understand it simply think about traditional letters: If you put a letter that has to be sent from 'A' to 'B' in an envelope that states a sender 'X' and a receiver 'Y' the delivery service will also return it to 'Y' regardless what the "headers" on the letter say. The only criterium is the envelope. If 'Y' is not reachable the letter will return to 'X', not to 'A'.
Regards, Frank
--On Montag, 19. März 2001 17:10 +0100 Frank Tegtmeyer <frank.tegtmeyer@cia-mediahaus.de> wrote:
So according to the spec I should use "Sender: <dtml-var OurBounceProcessingAccount>" in our DTML-Method that uses dtml-sendmail, no?
To handle autoresponders etc. that's ok. It doesn't handle delivery failures. You HAVE TO set the envelope sender accordingly (I think for Postfix it's the -f switch like for sendmail). To do that you have to generate a new method - possibly as external Python method.
After we all agreed that "Errors-To:" is bad ;) your external method could look like this: import os sendcommand = '/usr/sbin/sendmail -t -oi -f%s' mailtemplate = 'From: %s\nTo: %s\nSubject: %s\n%s\n' def sendMail( bounceto, mailfrom, mailto, subject, body ): p = os.popen( sendcommand % (bounceto), 'w', 1 ) p.write( mailtemplate % (mailfrom, mailto, subject, body) ) p.close() HTH, Stefan -- Things work better when plugged in.
Thank you Stefan, I was just writing an external method that would do what you recommend. Great! Thanks to everybody!!! It works as expected! Cheers! /B ----- Original Message ----- From: "Stefan H. Holek" <stefan@epy.co.at> To: <zope@zope.org> Cc: "Bruno Mattarollo" <bruno@dynamic.greenpeace.org> Sent: Monday, March 19, 2001 5:58 PM Subject: Re: [Zope] dtml-sendmail and envelop sender [Q] --On Montag, 19. März 2001 17:10 +0100 Frank Tegtmeyer <frank.tegtmeyer@cia-mediahaus.de> wrote:
So according to the spec I should use "Sender: <dtml-var OurBounceProcessingAccount>" in our DTML-Method that uses dtml-sendmail, no?
To handle autoresponders etc. that's ok. It doesn't handle delivery failures. You HAVE TO set the envelope sender accordingly (I think for Postfix it's the -f switch like for sendmail). To do that you have to generate a new method - possibly as external Python method.
After we all agreed that "Errors-To:" is bad ;) your external method could look like this: import os sendcommand = '/usr/sbin/sendmail -t -oi -f%s' mailtemplate = 'From: %s\nTo: %s\nSubject: %s\n%s\n' def sendMail( bounceto, mailfrom, mailto, subject, body ): p = os.popen( sendcommand % (bounceto), 'w', 1 ) p.write( mailtemplate % (mailfrom, mailto, subject, body) ) p.close() HTH, Stefan -- Things work better when plugged in.
hi, I've been using a lovely product called rsschannel, which simply and neatly gets news from rdf files. See my weblog (http://www.othermedia.com/blog). It's the only product I use that doesn't want to work in zope 2.3. Does anybody have any ideas why? Or has anyone got it going? Other RSS products I've tried to use in the past haven't even installed. (I contacted Amos, who I think created it, but as yet have had no reply.) cheers tom p.s Given that xml/rss is so popular, this would be a good thing to roll into the default zope installation wouldn't it. It's only small and so useful.
Hi! On Mon, 19 Mar 2001, tom smith wrote:
I've been using a lovely product called rsschannel, which simply and neatly gets news from rdf files. See my weblog (http://www.othermedia.com/blog).
It's the only product I use that doesn't want to work in zope 2.3. Does anybody have any ideas why? Or has anyone got it going? Other RSS products I've tried to use in the past haven't even installed.
I use RSS Channel on 2.3.0 without any minor problem. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (8)
-
Bruno Mattarollo -
Dieter Maurer -
Frank Tegtmeyer -
Marc Fischer -
Martijn Pieters -
Oleg Broytmann -
Stefan H. Holek -
tom smith