Discussion:
[maildropl] "From " header
Nethub Online - Ming
2015-06-26 06:35:58 UTC
Permalink
Hi,

After enabling maildrop, I found that it will add a "From " header to the
How to remove it or not adding it?

I tried "enable-keep-fromline=0" does not help.

I am using qmail, vpopmail-5.4.25, maildrop-2.8.2
Sam Varshavchik
2015-06-26 10:21:56 UTC
Permalink
Post by Nethub Online - Ming
Hi,
After enabling maildrop, I found that it will add a "From " header to the
How to remove it or not adding it?
maildrop adds the From header when writing mail to mbox files. That's the
format of mbox files.

Switch to maildirs.
Nethub Online - Ming
2015-06-29 06:19:38 UTC
Permalink
Post by Sam Varshavchik
Post by Nethub Online - Ming
Hi,
After enabling maildrop, I found that it will add a "From " header to the
From root <at> helloworld.com Fri Jun 26 06:27:19 2015
How to remove it or not adding it?
maildrop adds the From header when writing mail to mbox files. That's the
format of mbox files.
Switch to maildirs.
------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
Courier-maildrop mailing list
Courier-maildrop <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/courier-maildrop
Thanks Sam,

I am sorry that would you let me know how to do it? Actually I thought
maildrop would auto detect by checking the destination is a file or
directory. Below is my maildrop simple config for testing and the related
home directory structure.




# cat /etc/maildroprc
SHELL="/bin/sh"
import EXT
import HOST
VPOPMAILDIR="/home/vpopmail"
VHOME=`$VPOPMAILDIR/bin/vuserinfo -d $EXT@$HOST`
HOME=$VHOME
DEFAULT=$VHOME/Maildir

exception {
to "$VHOME/Maildir"
}

# ls -al /home/vpopmail/domains/vo.demo360.net/test
total 16
drwx------ 3 vpopmail vchkpw 4096 May 15 15:44 .
drwx------ 4 vpopmail vchkpw 4096 May 15 15:44 ..
drwx------ 5 vpopmail vchkpw 4096 May 15 15:44 Maildir
-rw------- 1 vpopmail vchkpw 14 Jun 29 10:35 lastauth

# ls -al /home/vpopmail/domains/vo.demo360.net/test/Maildir/
total 20
drwx------ 5 vpopmail vchkpw 4096 May 15 15:44 .
drwx------ 3 vpopmail vchkpw 4096 May 15 15:44 ..
drwx------ 2 vpopmail vchkpw 4096 May 15 15:44 cur
drwx------ 2 vpopmail vchkpw 4096 Jun 29 12:02 new
drwx------ 2 vpopmail vchkpw 4096 Jun 29 12:02 tmp
Sam Varshavchik
2015-06-29 10:58:44 UTC
Permalink
Post by Nethub Online - Ming
Post by Sam Varshavchik
Post by Nethub Online - Ming
Hi,
After enabling maildrop, I found that it will add a "From " header to the
From root <at> helloworld.com Fri Jun 26 06:27:19 2015
How to remove it or not adding it?
maildrop adds the From header when writing mail to mbox files. That's the
format of mbox files.
Switch to maildirs.
Thanks Sam,
I am sorry that would you let me know how to do it? Actually I thought
maildrop would auto detect by checking the destination is a file or
directory. Below is my maildrop simple config for testing and the related
home directory structure.
Correct, this is a maildir.

Something has must be adding a From header before maildrop receives the mail.
Nethub Online - Ming
2015-06-30 07:19:56 UTC
Permalink
Post by Sam Varshavchik
Post by Nethub Online - Ming
Thanks Sam,
I am sorry that would you let me know how to do it? Actually I thought
maildrop would auto detect by checking the destination is a file or
directory. Below is my maildrop simple config for testing and the related
home directory structure.
Correct, this is a maildir.
Something has must be adding a From header before maildrop receives the mail.
Thanks Sam. But I afraid there is no other application adding the From
header, because we tested "vmoduser -x" to disable the maildrop then the
problem gone. Secondly, we tested maildrop-2.6.0 without this problem, and
since maildrop-2.7.0, and 2.8.x, the From header is added.
Sam Varshavchik
2015-06-30 10:47:46 UTC
Permalink
Post by Nethub Online - Ming
Post by Sam Varshavchik
Post by Nethub Online - Ming
Thanks Sam,
I am sorry that would you let me know how to do it? Actually I thought
maildrop would auto detect by checking the destination is a file or
directory. Below is my maildrop simple config for testing and the related
home directory structure.
Correct, this is a maildir.
Something has must be adding a From header before maildrop receives the
mail.
Thanks Sam. But I afraid there is no other application adding the From
header, because we tested "vmoduser -x" to disable the maildrop then the
problem gone. Secondly, we tested maildrop-2.6.0 without this problem, and
since maildrop-2.7.0, and 2.8.x, the From header is added.
I don't know anything about vmoduser, or how it invokes maildrop.

Looking at my maildir, there are no From_ lines in any message. Either the
Post by Nethub Online - Ming
From header gets added by whatever invokes maildrop to deliver mail, or
maildrop thinks it's delivering to an mbox file.
Nethub Online - Ming
2015-07-02 08:57:04 UTC
Permalink
Post by Sam Varshavchik
I don't know anything about vmoduser, or how it invokes maildrop.
Looking at my maildir, there are no From_ lines in any message. Either the
Post by Nethub Online - Ming
From header gets added by whatever invokes maildrop to deliver mail, or
maildrop thinks it's delivering to an mbox file.
Thanks Sam again.

I found the problem.

I am using vpopmail-5.4.33 + qmail, and I found that vdelivermail.c of
vpopmail contains this line:

sprintf(maildrop_command, "| preline %s", MAILDROP_PROG);

After I removed "preline ", then the maildrop won't add "From " header
anymore. And I checked preline is the qmail binary which is
"/var/qmail/bin/preline".

Since I tested maildrop prior to version 2.6.0 doesn't has this problem, but
only 2.7.0 or later version, so I am not sure it is maildrop's handling
problem or vpopmail should not add "preline" before maildrop.

Do you think this is qmail/vpopmail problem? If yes I will report to
vpopmail community.

One last question, do you think I can remove "preline" before calling maildrop?
Sam Varshavchik
2015-07-02 10:58:34 UTC
Permalink
Post by Nethub Online - Ming
Post by Sam Varshavchik
I don't know anything about vmoduser, or how it invokes maildrop.
Looking at my maildir, there are no From_ lines in any message. Either the
Post by Nethub Online - Ming
From header gets added by whatever invokes maildrop to deliver mail, or
maildrop thinks it's delivering to an mbox file.
Thanks Sam again.
I found the problem.
I am using vpopmail-5.4.33 + qmail, and I found that vdelivermail.c of
sprintf(maildrop_command, "| preline %s", MAILDROP_PROG);
After I removed "preline ", then the maildrop won't add "From " header
anymore. And I checked preline is the qmail binary which is
"/var/qmail/bin/preline".
Since I tested maildrop prior to version 2.6.0 doesn't has this problem, but
only 2.7.0 or later version, so I am not sure it is maildrop's handling
problem or vpopmail should not add "preline" before maildrop.
maildrop never needed the From line. Earlier versions removed it, if it was
there, but that was changed, when maildrop's internals were rewritten to
support UTF-8.
Post by Nethub Online - Ming
Do you think this is qmail/vpopmail problem? If yes I will report to
vpopmail community.
One last question, do you think I can remove "preline" before calling maildrop?
Yes. maildrop never needed the From line.
Christian Ebert
2015-07-02 13:19:09 UTC
Permalink
* Sam Varshavchik on Thursday, July 02, 2015 at 06:58:34 -0400
Post by Sam Varshavchik
Yes. maildrop never needed the From line.
AFAIK it's needed for mbox to avoid confusion with the message
separator. But maildrop doesn't do mbox, or does it?
--
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions
Sam Varshavchik
2015-07-02 23:48:16 UTC
Permalink
Post by Christian Ebert
* Sam Varshavchik on Thursday, July 02, 2015 at 06:58:34 -0400
Post by Sam Varshavchik
Yes. maildrop never needed the From line.
AFAIK it's needed for mbox to avoid confusion with the message
separator. But maildrop doesn't do mbox, or does it?
maildrop does deliver to mbox files, and it will write a proper message
separator line.
Christian Ebert
2015-07-03 07:28:22 UTC
Permalink
* Sam Varshavchik on Thursday, July 02, 2015 at 19:48:16 -0400
Post by Sam Varshavchik
Post by Christian Ebert
* Sam Varshavchik on Thursday, July 02, 2015 at 06:58:34 -0400
Post by Sam Varshavchik
Yes. maildrop never needed the From line.
AFAIK it's needed for mbox to avoid confusion with the message
separator. But maildrop doesn't do mbox, or does it?
maildrop does deliver to mbox files, and it will write a proper
message separator line.
Yes, but what happens if a message contains something like
in the message body? I thought that was the prepending of > in
the body for. From man 5 mbox:

In order to avoid misinterpretation of lines in message bodies
which begin with the four characters "From", followed by a space
character, the mail delivery agent must quote any occurrence of
"From " at the start of a body line.
--
Was heißt hier Dogma, ich bin Underdogma!
[ What the hell do you mean dogma, I am underdogma. ]
free movies --->>> http://www.blacktrash.org/underdogma
https://www.facebook.com/blacktrashproductions/app_165449913503883
Sam Varshavchik
2015-07-03 12:09:56 UTC
Permalink
Post by Christian Ebert
* Sam Varshavchik on Thursday, July 02, 2015 at 19:48:16 -0400
Post by Sam Varshavchik
Post by Christian Ebert
* Sam Varshavchik on Thursday, July 02, 2015 at 06:58:34 -0400
Post by Sam Varshavchik
Yes. maildrop never needed the From line.
AFAIK it's needed for mbox to avoid confusion with the message
separator. But maildrop doesn't do mbox, or does it?
maildrop does deliver to mbox files, and it will write a proper
message separator line.
Yes, but what happens if a message contains something like
in the message body? I thought that was the prepending of > in
In order to avoid misinterpretation of lines in message bodies
which begin with the four characters "From", followed by a space
character, the mail delivery agent must quote any occurrence of
"From " at the start of a body line.
Yes, maildrop will do that as well.

Continue reading on narkive:
Loading...