Re: Problem with sendmail : invalid sender

Pierre-Alexandre Voye <[email protected]> Fri, 4 May 2012 16:22:46 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <CANnJ5Gf0D_UK7yv0WEMHhergUWgnzPVhOk8Dy3EMpaXjkQKsfA@mail.gmail.com>
It works !
I modified the myorigin with a domain which exists, and event the email
[email protected] (the myorigin I seted) does not exists,
smtp.orange.fraccepts it.

Thank you

PS : Good trick, Shame on me I didn't thought to do that !

2012/5/4 Gerd Stolpmann <[email protected]>

>
> > I did the test and it doesn't work.
> > I don't understand why it works, when I type this in the terminal :
> >
> > printf "Subject: TestnHello" | sendmail -f [email protected]
> > [email protected]
> > Is there a way to see what command line is emitted ?
>
> Create a script "fakemailer":
>
> #! /bin/sh
>
> echo "Arguments: $@"
> cat
>
> and then Netsendmail.sendmail ~mailer:"./fakemailer" msg
>
> Note that the -f switch of sendmail does not set the FROM line within the
> message but the envelope sender address. The envelope sender is the
> address that counts. Normally, sendmail extracts it from the FROM line, so
> this is another thing that could go wrong. From the log file I see that
> the envolope sender is "[email protected]" (watch out for
> "from="). This looks like a rewritten address (or simply the myorigin
> parameter from main.cf). Such an address can in deed be problematic
> because "local" is no valid domain.
>
> Gerd
>
> > 2012/5/4 Gerd Stolpmann <[email protected]>
> >
> >> Just tried it on my local postfix installation, and did not get this
> >> error. In your case, smtp.orange.fr bounces the mail. I guess they have
> >> some additional filters in place to make spamming under wrong name
> >> impossible. Maybe these filters do not work correctly.
> >>
> >> You can experiment: If the name part of from_addr only consists of
> >> US-ASCII chars, a simpler header is created (without encoding) - maybe
> >> this is more compatible with the gateway.
> >>
> >> Gerd
> >>
> >> > Hi list,
> >> >
> >> > I'm trying to send a mail via Netsendmail.
> >> > The library is very easy to handle, so here's my code (copied from the
> >> > tutorial) :
> >> >
> >> > let msg = Netsendmail.compose
> >> >   ~in_charset:`Enc_iso885915
> >> >   ~out_charset:`Enc_iso885915
> >> >   ~from_addr:("Heinz Dräger", "[email protected]")
> >> >   ~to_addrs:[("Marion Schröder", "[email protected]")]
> >> >   ~content_type:("text/html", ["charset", Mimestring.mk_param
> >> > "ISO-8859-1"])
> >> >   ~subject:"Geschäftlich"
> >> >   "<html><body>Verkaufe Teddy-Bären für
> >> 100&euro;</body></html>";;
> >> >
> >> > Netsendmail.sendmail ~mailer:"/usr/sbin/sendmail" msg ;;
> >> >
> >> > So it actually sends an email, but it does not takes the "from" field
> >> :
> >> >
> >> > May  4 14:44:52 ontologiae postfix/master[79734]: daemon started --
> >> > version
> >> > 2.8.4, configuration /etc/postfix
> >> > May  4 14:44:52 ontologiae postfix/pickup[79735]: 0E067B55B42: uid=501
> >> > from=<ontologiae>
> >> > May  4 14:44:52 ontologiae postfix/cleanup[79737]: 0E067B55B42:
> >> > message-id=<[email protected]>
> >> > May  4 14:44:52 ontologiae postfix/qmgr[79736]: 0E067B55B42:
> >> > from=<[email protected]>, size=631, nrcpt=1 (queue active)
> >> > May  4 14:44:53 ontologiae postfix/smtp[79739]: 0E067B55B42: to=<
> >> > [email protected]>, relay=smtp.orange.fr[193.252.22.64]:25,
> >> delay=1.6,
> >> > delays=0.28/0.01/0.3/0.97, dsn=5.1.0, status=bounced (host
> >> > smtp.orange.fr[193.252.22.64]
> >> > said: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR203_405 [405]
> >> (in
> >> > reply to MAIL FROM command))
> >> > May  4 14:44:53 ontologiae postfix/cleanup[79737]: 9DC05B55B46:
> >> > message-id=<[email protected]>
> >> > May  4 14:44:53 ontologiae postfix/bounce[79742]: 0E067B55B42: sender
> >> > non-delivery notification: 9DC05B55B46
> >> > May  4 14:44:53 ontologiae postfix/qmgr[79736]: 9DC05B55B46: from=<>,
> >> > size=2652, nrcpt=1 (queue active)
> >> > May  4 14:44:53 ontologiae postfix/qmgr[79736]: 0E067B55B42: removed
> >> > May  4 14:44:53 ontologiae postfix/local[79743]: 9DC05B55B46:
> >> > to=<[email protected]>, relay=local, delay=0.01,
> >> > delays=0/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
> >> > May  4 14:44:53 ontologiae postfix/qmgr[79736]: 9DC05B55B46: removed
> >> >
> >> >
> >> > Is there a solution ?
> >> >
> >> > In advance, thanks.
> >> >
> >> > Best regards,
> >> >
> >> > Pierre-Alexandre
> >> > --
> >> > ---------------------
> >> > https://twitter.com/#!/ontologiae/
> >> > http://linuxfr.org/users/montaigne
> >> >
> >>
> ------------------------------------------------------------------------------
> >> > Live Security Virtual Conference
> >> > Exclusive live event will cover all the ways today's security and
> >> > threat landscape has changed and how IT managers can respond.
> >> Discussions
> >> > will include endpoint security, mobile security and the latest in
> >> malware
> >> > threats.
> >> >
> >>
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> >> > Ocamlnet-devel mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel
> >> >
> >>
> >>
> >> --
> >> Gerd Stolpmann, Darmstadt, Germany    [email protected]
> >> Creator of GODI and camlcity.org.
> >> Contact details:        http://www.camlcity.org/contact.html
> >> Company homepage:       http://www.gerd-stolpmann.de
> >> *** Searching for new projects! Need consulting for system
> >> *** programming in Ocaml? Gerd Stolpmann can help you.
> >>
> >>
> >
> >
> > --
> > ---------------------
> > https://twitter.com/#!/ontologiae/
> > http://linuxfr.org/users/montaigne
> >
> ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats.
> >
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> > Ocamlnet-devel mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel
> >
>
>
> --
> Gerd Stolpmann, Darmstadt, Germany    [email protected]
> Creator of GODI and camlcity.org.
> Contact details:        http://www.camlcity.org/contact.html
> Company homepage:       http://www.gerd-stolpmann.de
> *** Searching for new projects! Need consulting for system
> *** programming in Ocaml? Gerd Stolpmann can help you.
>
>


-- 
---------------------
https://twitter.com/#!/ontologiae/
http://linuxfr.org/users/montaigne

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Ocamlnet-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ocamlnet-devel