Problem with sendmail : invalid sender

Pierre-Alexandre Voye <[email protected]> Fri, 4 May 2012 14:54:53 +0200
Newsgroups gmane.comp.lang.ocaml.lib.net.devel
Message-ID <CANnJ5GfikRDHyRhT=CZZwVkfPrW3Eh-E_5Y1yVrpHO2MJvy-yw@mail.gmail.com>
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