Re: getting sendmail to add Return-Path: header
On Fri, Jul 04, 2003 at 11:19:57AM -0400, David Banning wrote: I need to have the Return-Path: header to added to my emails. Any idea what is needed to configure sendmail to do that? Return-Path: is meant to be inserted into the message headers by the sendmail that does final delivery -- it's not something you should set on all of the e-mail you send out. The machinery to handle all this should already be in your sendmail.cf -- if there's a line: H?P?Return-Path: $g in the 'Format of Headers' section, then any delivery mailer with 'P' in the F= flags (which is the default for the local and prog mailers) will insert the Return-Path: header -- eg. Mlocal, P=/usr/libexec/mail.local, F=lsDFMAw5:/|@qPSXfmnz9, S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, T=DNS/RFC822/SMTP, A=mail.local -l These are the default settings, and it would take sufficient effort to generate a sendmail.cf without something like those in it that you would surely remember doing so... See http://www.faqs.org/rfcs/rfc2821.html, section 4.4 for the chapter and verse about the Return-Path: header. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: getting sendmail to add Return-Path: header
Return-Path: is meant to be inserted into the message headers by the sendmail that does final delivery -- it's not something you should set on all of the e-mail you send out. The machinery to handle all this should already be in your sendmail.cf -- if there's a line: H?P?Return-Path: $g in the 'Format of Headers' section, then any delivery mailer with 'P' in the F= flags (which is the default for the local and prog mailers) will insert the Return-Path: header -- eg. Mlocal, P=/usr/libexec/mail.local, F=lsDFMAw5:/|@qPSXfmnz9, S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, OK. I've got the same entries as you, but I am not getting the Return-Path: put in the header. Now I am reading my mail -on- the server. Since it is mail.local or in my case procmail that reads it, it -should- put it in before depositing it in /var/mail for pickup, shouldn't it? I have tried compiling with the procmail option out, like yours and it makes no difference. My sendmail.cf shows; Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/Hdr FromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=procmail -Y -a $h -d $u Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D =$z:/, T=X-Unix/X-Unix/X-Unix, A=sh -c $u ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: getting sendmail to add Return-Path: header
On Fri, Jul 04, 2003 at 04:28:48PM -0400, David Banning wrote: Return-Path: is meant to be inserted into the message headers by the sendmail that does final delivery -- it's not something you should set on all of the e-mail you send out. The machinery to handle all this should already be in your sendmail.cf -- if there's a line: H?P?Return-Path: $g in the 'Format of Headers' section, then any delivery mailer with 'P' in the F= flags (which is the default for the local and prog mailers) will insert the Return-Path: header -- eg. Mlocal, P=/usr/libexec/mail.local, F=lsDFMAw5:/|@qPSXfmnz9, S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, OK. I've got the same entries as you, but I am not getting the Return-Path: put in the header. Now I am reading my mail -on- the server. Since it is mail.local or in my case procmail that reads it, it -should- put it in before depositing it in /var/mail for pickup, shouldn't it? I have tried compiling with the procmail option out, like yours and it makes no difference. My sendmail.cf shows; Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/Hdr FromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=procmail -Y -a $h -d $u Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D =$z:/, T=X-Unix/X-Unix/X-Unix, A=sh -c $u Actually, I use procmail as the default delivery agent myself --- that example came from /etc/mail/freebsd.cf --- but even so, the Return-Path: stuff is inserted correctly. How are you checking for the presence or absence of the header? Most mail applications will weed it out of what they display to you -- bouncing on the 'h' key in mutt shows it, generally as the 2nd line of header right underneath the 'From ' line. Otherwise, grep'ing the mbox file directly is probably the thing to do. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: getting sendmail to add Return-Path: header
Actually, I use procmail as the default delivery agent myself --- that example came from /etc/mail/freebsd.cf --- but even so, the Return-Path: stuff is inserted correctly. How are you checking for the presence or absence of the header? Most mail applications will weed it out of what they display to you -- bouncing on the 'h' key in mutt shows it, generally as the 2nd line of header right underneath the 'From ' line. Otherwise, grep'ing the mbox file directly is probably the thing to do. There's no mistaking it. I've used vi and grep. Here, is the message as I received it from you; From [EMAIL PROTECTED] Fri Jul 4 16:40:08 2003 Received: (from [EMAIL PROTECTED]) by 3s1.com (8.12.9/8.12.9) id h64Ke8IG019663 for [EMAIL PROTECTED]; Fri, 4 Jul 2003 16:40:08 -0400 (EDT) (envelope-from [EMAIL PROTECTED]) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69. 218]) by 3s1.com (8.12.9/8.12.6) with ESMTP id h64Ke6m4019636 for [EMAIL PROTECTED]; Fri, 4 Jul 2003 16:40:07 -0400 (EDT) (envelope-from [EMAIL PROTECTED]) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) by smtp.infracaninophile.co.uk (8.12.9/8.12.9) with ESMTP id h64KcZZj030 890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 4 Jul 2003 21:39:57 +0100 (BST) (envelope-from [EMAIL PROTECTED]) Received: (from [EMAIL PROTECTED]) by happy-idiot-talk.infracaninophile.co.uk (8.12.9/8.12.9/Submit) id h64 KcZLF030889; Fri, 4 Jul 2003 21:38:35 +0100 (BST) (envelope-from matthew) Date: Fri, 4 Jul 2003 21:38:35 +0100 From: Matthew Seaman [EMAIL PROTECTED] To: David Banning [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: getting sendmail to add Return-Path: header Message-ID: [EMAIL PROTECTED] Mail-Followup-To: Matthew Seaman [EMAIL PROTECTED], David Banning [EMAIL PROTECTED], [EMAIL PROTECTED] References: [EMAIL PROTECTED] 20030704190458.GD6905 [EMAIL PROTECTED] [EMAIL PROTECTED] ada.com Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol=application/pgp-signature; boundary=gBBFr7Ir9EOA20Yy Content-Disposition: inline In-Reply-To: [EMAIL PROTECTED] User-Agent: Mutt/1.5.4i X-scanner: scanned by Inflex 1.0.12.3 - (http://pldaniels.com/inflex/) X-Spam-Status: No, hits=-6.5 required=5.0 tests=IN_REP_TO,PGP_SIGNATURE_2 version=2.31 X-Spam-Level: --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 04, 2003 at 04:28:48PM -0400, David Banning wrote: Return-Path: is meant to be inserted into the message headers by the sendmail that does final delivery -- it's not something you should set on all of the e-mail you send out. The machinery to handle all this and so on... ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: getting sendmail to add Return-Path: header
Now it seems to be working. I inserted it in the F section of the settings below the one we discussed and it seems to work. Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/Hdr FromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=procmail -Y -a $h -d $u Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/H... HERE^ I am not sure what I did, or what the purpose of Mprog is. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: getting sendmail to add Return-Path: header
On Fri, Jul 04, 2003 at 05:06:45PM -0400, David Banning wrote: Actually, I use procmail as the default delivery agent myself --- that example came from /etc/mail/freebsd.cf --- but even so, the Return-Path: stuff is inserted correctly. How are you checking for the presence or absence of the header? Most mail applications will weed it out of what they display to you -- bouncing on the 'h' key in mutt shows it, generally as the 2nd line of header right underneath the 'From ' line. Otherwise, grep'ing the mbox file directly is probably the thing to do. There's no mistaking it. I've used vi and grep. Here, is the message as I received it from you; From [EMAIL PROTECTED] Fri Jul 4 16:40:08 2003 Received: (from [EMAIL PROTECTED]) by 3s1.com (8.12.9/8.12.9) id h64Ke8IG019663 for [EMAIL PROTECTED]; Fri, 4 Jul 2003 16:40:08 -0400 (EDT) (envelope-from [EMAIL PROTECTED]) Yup. It's definitely not there. This has me completely perplexed. You seem to be doing everything correctly, and all of the right things are appearing in the sendmail.cf file, but the fault is definitely occurring. All I can conclude is that there is some trivial boo-boo somewhere that will have you slapping your forehead and shouting D'Oh! in the approved Homer-Simpson-esque style. It's going to be something on the level of you're not using the sendmail binary you think you are, or it's not reading /etc/mail/sendmail.cf. Have you sanity checked /etc/mail/mailer.conf ? Does anything untoward appear in /var/log/maillog ? How about the maillog entries when you restart the MTA? Can you try this: run sendmail in address test mode: % /usr/sbin/sendmail -bt and check the output of dumping the mailer definitions: =M (ie. make sure that the local mailer definition being used by sendmail is actually the same as in /etc/mail/sendmail.cf) Also try: /parse [EMAIL PROTECTED] which should give you Parse1 and parse lines like so: Parse1 returns: $# local $: david parsereturns: $# local $: david indicating that your sendmail will use the local mailer to do the final delivery. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: getting sendmail to add Return-Path: header
On Fri, Jul 04, 2003 at 05:38:13PM -0400, David Banning wrote: Now it seems to be working. I inserted it in the F section of the settings below the one we discussed and it seems to work. Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/Hdr FromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=procmail -Y -a $h -d $u Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/H... HERE^ I am not sure what I did, or what the purpose of Mprog is. The prog mailer is generally for aliases that pipe mail into programs -- eg: msgs: | /usr/bin/msgs -s It's not often used --- too much opportunity for abuse over the network. About the only thing I remember ever using it was majordomo, but I suppose it could be something to do with anti-spam or anti-virus scanning. The question now must be why your system is using the 'prog' mailer to do final delivery of your e-mail? Got any interesting entries in /etc/mail/mailertable or /etc/mail/aliases ? Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: getting sendmail to add Return-Path: header
In the last episode (Jul 04), Matthew Seaman said: On Fri, Jul 04, 2003 at 05:38:13PM -0400, David Banning wrote: Now it seems to be working. I inserted it in the F section of the settings below the one we discussed and it seems to work. Mlocal, P=/usr/local/bin/procmail, F=lsDFMAw5:/|@qSPfhn9, S=EnvFromL/Hdr FromL, R=EnvToL/HdrToL, T=DNS/RFC822/X-Unix, A=procmail -Y -a $h -d $u Mprog, P=/bin/sh, F=lsDFMoqeu9, S=EnvFromL/H... HERE^ I am not sure what I did, or what the purpose of Mprog is. The prog mailer is generally for aliases that pipe mail into programs It also applies to pipes in .forward files, so if David has a |procmail entry in his .forward, that will force sendmail to use the prog mailer instead of local. FEATURE(local_procmail) in your .mc is a better solution, which will tell sendmail to use procmail as the local delivery agent, so you don't need .forward at all. -- Dan Nelson [EMAIL PROTECTED] ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]