Jesse Keating writes:

After a recent conversation with Mr. Sam (thanx for the help!!) I was able to resolve a return-path issue. In my /etc/courier/maildrop file, it was listed /usr/lib/courier/bin/maildrop. In my .courier file for my account, I was pointing to /usr/local/bin/maildrop, which was a symlink to the above mentioned maildrop. Even though they were ultimately using the same file, none of my messages would get a return-path set on them until I pointed my .courier file directly at /usr/lib/courier/bin/maildrop.
My question, is this by design, or some odd flaw that nobody else has run across yet? I'm just curious, as now I have return-path working again.
It's part of the design. The intention is to give the same environment to programs invoked from a .courier file as the environment Qmail uses for delivery agents invoked from .qmail files. Qmail only prepends the return path (and the recipient envelope address) to the message if Qmail handles delivery itself. Programs invoke from a .qmail file receive the return path and the recipient path in environment variables; and they are expected to the the prepending themselves.

For programs that do not handle prepending themselves, the preline wrapper prepends the additional headers before running the delivery programs.

Maildrop, as an application, existed several years before Courier. It was not tied to Qmail; and did not pay much attention to Qmail's oddities. Consequently to that, it required preline if the delivered mail were to include the additional headers.

And, just like with Qmail, you can use preline with maildrop to prepend the additional headers; and run the whole thing from a .courier file. However, were you to go that route, what has to happen is that the message gets copied to a temporary file first, including the extra headers, and that's what gets delivered. This is nothing new, the same thing would happen with Qmail too.

And, in both cases, if a 40mb message gets arrives, this requires a 40mb temporary file to be created first, with the additional headers, before the mail gets filtered. Note that this has to happen only if maildrop is in the picture. If Courier/Qmail deliver mail by themselves they'll prepend the extra headers when copying the message to the recipient's mailbox, without needing a temporary file.

Instead of using preline, and having to waste time dicking around with a temp file, running maildrop from a .courier, if done properly, will get you the extra headers, and the temporary file stage is skipped. This can only happen if Courier knows that what it's running from a .courier file is maildrop. And the only way to know that is by explicitly defining the path to the maildrop binary. So, if Courier sees that what it's about to run is maildrop (without any additional parameters, just the bare bones thing), then it silently slaps on additional maildrop parameters that result in maildrop picking up the extra headers, and delivering the message directly from the mail queue, without creating a temporary file.




-------------------------------------------------------
This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at:
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users


Reply via email to