[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] Mail delivered twice



On 11/05/10 19:34:39, Andreas Krauß wrote:
> Today I have forwarded a blocked email to my mail-account.
> 
> msmtp -host=localhost -port=10025 -protocol=smtp -read-envelope-from 
> mymail@...226... <var/lib/amavis/virusmails/virus-56hlCeBKv9zn
> 
> The email was delivered to the intended recipient and to me. What did
> I do wrong?

G'day Andreas,

If the first paragraph of the blocked email (ie, all down to the first 
blank line) contained only headers then msmtp (and all properly 
functioning MTAs) will treat that paragraph as headers or additional 
headers. My guess is that is what happened -- the first paragraph 
contained only headers (including one or more "To:" headers) so msmtp 
treated them accordingly and sent off the mail to every "To:" addressee 
(including the original addressee).

NOTE: email protocol allows for multiple addressees to be included as 
individual "To:" addressees, each one on a separate line.

If you wish to include a blocked email in its unaltered entirety as the 
message body then you should include some ordinary text (ie, non-header 
material) in a preceding paragraph in order to prevent the headers of 
the blocked email being treated as headers in the email wrapper.

Of course, the preferred way of handling the whole transaction is to 
include the blocked email as a mime attachment. That way you do not 
have to worry about whether the recipient's mail server (and all the 
intermediate servers) follow the protocol correctly.

HTH,
Robert Thorsby
When I was young I used to think that money was the most important 
thing in life; now that I am old, I know it is. -- Oscar Wilde