[opensuse] Sending mail via my ISP relay using sendmail
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH. Using kmail, I have no trouble sending mail. In fact, using the Linux mail command I have no trouble either, thought the (ISP smtp URL,username, password) triplet must be specified in ~/.mailrc. I've gotten a procedure for providing the triplet to sendmail, but my test messages never arrive. According to the docs I've looked at, I need to put a line like this in the file /etc/postfix/sasl_passwd: smtp.comcast.net theuser:xxx I then need to hash that file to create another file, /etc/postfix/sasl_passwd.db, using the "postmap" program. Finally, I need to insert these lines in the main.cf file that provides postfix with its configuration: smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = The configuration file seems to be located in the directory /etc/postfix. I then need to reload postfix with the command postfix reload I've done all that and I get no error messages -- but no mail arrives when I issue the command sendmail abrahams@acm.org this is a test message . How can I track down the reason the mail isn't arriving? Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 04 January 2007 20:28, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
Using kmail, I have no trouble sending mail. In fact, using the Linux mail command I have no trouble either, thought the (ISP smtp URL,username, password) triplet must be specified in ~/.mailrc. I've gotten a procedure for providing the triplet to sendmail, but my test messages never arrive.
According to the docs I've looked at, I need to put a line like this in the file /etc/postfix/sasl_passwd:
Are you sure you need to deal with sasl? Its mostly for receiving mail. It would seem that it would be easier to configure postfix as relay host, relaying to your ISP. That you can do with yast. Just check some boxes, and Bob's your Uncle. Then your PHP5 would only need to use sendmail to connect to localhost (your own postfix) and have it send the mail by what ever means. This is the way I often configure Kmail, because it sends instantly, without having to wait for it to make a connection etc. Let Postfix do the grunt work in the back ground. -- _____________________________________ John Andersen -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
John Andersen wrote:
On Thursday 04 January 2007 20:28, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
Using kmail, I have no trouble sending mail. In fact, using the Linux mail command I have no trouble either, thought the (ISP smtp URL,username, password) triplet must be specified in ~/.mailrc. I've gotten a procedure for providing the triplet to sendmail, but my test messages never arrive.
According to the docs I've looked at, I need to put a line like this in the file /etc/postfix/sasl_passwd:
Are you sure you need to deal with sasl? Its mostly for receiving mail.
sasl is for authentication. If the relayserver requires authentication, then you need sasl for smtp. The parameters for the sending client "smtp" and the receiving server "smtpd" can be configured separately. Default values are: smtp client: # postconf -d | grep smtp_sasl smtp_sasl_auth_enable = no smtp_sasl_mechanism_filter = smtp_sasl_password_maps = smtp_sasl_path = smtp_sasl_security_options = noplaintext, noanonymous smtp_sasl_tls_security_options = $smtp_sasl_security_options smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options smtp_sasl_type = cyrus smtpd server: # postconf -d | grep smtpd_sasl smtpd_sasl_auth_enable = no smtpd_sasl_authenticated_header = no smtpd_sasl_exceptions_networks = smtpd_sasl_local_domain = smtpd_sasl_path = smtpd smtpd_sasl_security_options = noanonymous smtpd_sasl_tls_security_options = $smtpd_sasl_security_options smtpd_sasl_type = cyrus Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2007-01-05 at 00:28 -0500, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
Ok, you mean you are using postfix, but call the sendmail binary of the postfix package, no? ...
I've done all that and I get no error messages -- but no mail arrives when I issue the command
sendmail abrahams@acm.org this is a test message .
How can I track down the reason the mail isn't arriving?
Logs: /var/log/mail - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFnjditTMYHG2NR9URAtPZAKCX4jdu2nTDCqaGu9EIwW87mHQBlgCbBPBz Q9Exfq5gfI3KTgbRb4Payv0= =Ife5 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 6:32 am, Carlos E. R. wrote:
The Friday 2007-01-05 at 00:28 -0500, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
How can I track down the reason the mail isn't arriving?
Aha! The log contains this: Jan 5 10:46:59 suillus postfix/smtp[7947]: 15FEE9CE00: to=<abrahams@acm.org>, relay=smtp.comcast.net[206.18.177.17]:25, delay=7.1, delays=6.5/0.02/0.42/0.16, dsn=5.0.0, status=bounced (host smtp.comcast.net[206.18.177.17] said: 550 [PERMFAIL] acm.org requires valid sender domain (in reply to RCPT TO command)) I took the suggestions of several other people and still get this result: Joachim Schrod suggested changing the sendmail call to something like this: sendmail -t -v From: <mbox@example.com> To: <mbox@example.com> Subject: test He also noted that mail uses sendmail -- and in fact, mail works perfectly for the relay on my box. Patrick Shanahan suggested adding this to main.cf: relayhost = smtp.comcast.net followed by postfix reload John Andersen suggested that I didn't need to fiddle with main.cf at all, but could just do the configuration through Yast (Mail Transfer Agent). I took all of those suggestions, but still get the message above in the mail log. So the real problem seems to lie with the sender domain. All this reminds me of an experience I had about a month ago when I had some very strange behavior from Grub and asked for help on this list. Ultimately I discovered that I had a hardware problem with the docking unit I was using for my hard drive, so some disk operations were failing -- just a few. So the weird things I was seeing weren't due to software or Grub misconfiguration at all. This time it's almost certainly not hardware. Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Paul Abrahams wrote:
On Friday 05 January 2007 6:32 am, Carlos E. R. wrote:
The Friday 2007-01-05 at 00:28 -0500, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
How can I track down the reason the mail isn't arriving?
Aha! The log contains this:
Jan 5 10:46:59 suillus postfix/smtp[7947]: 15FEE9CE00: to=<abrahams@acm.org>, relay=smtp.comcast.net[206.18.177.17]:25, delay=7.1, delays=6.5/0.02/0.42/0.16, dsn=5.0.0, status=bounced (host smtp.comcast.net[206.18.177.17] said: 550 [PERMFAIL] acm.org requires valid sender domain (in reply to RCPT TO command))
I took the suggestions of several other people and still get this result:
Joachim Schrod suggested changing the sendmail call to something like this:
sendmail -t -v From: <mbox@example.com> To: <mbox@example.com> Subject: test
He also noted that mail uses sendmail -- and in fact, mail works perfectly for the relay on my box.
Patrick Shanahan suggested adding this to main.cf: relayhost = smtp.comcast.net
followed by
postfix reload
John Andersen suggested that I didn't need to fiddle with main.cf at all, but could just do the configuration through Yast (Mail Transfer Agent).
I took all of those suggestions, but still get the message above in the mail log.
So the real problem seems to lie with the sender domain.
It depends. Does the server smtp.comcast.net require authentication for you to relay or does it simply check your ip and allows relaying based on that? The sender address must be a real existing address. Use the address you expect others to answer to as the sender address, and you should not have a problem. It is still possible that you will have to authenticate to the relayserver to be able to relay. To use smtp auth with postfix: /etc/postfix/smtp_relayhost_auth: [smtp.comcast.net] username:password Then execute "postmap /etc/postfix/smtp_relayhost_auth" /etcp/postfix/main.cf: # square brackets around hostname to suppress mx lookup of relayhost relayhost = [smtp.comcast.net] smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/smtp_relayhost_auth smtp_sasl_security_options = noanonymous After you have inserted these options, verify with the output of "postconf -n" that these options are active. Then execute "postfix reload" to refresh the changed configuration. Now send a testmail with valid sender address and recipient address. Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 12:31 pm, Sandy Drobic wrote:
Paul Abrahams wrote:
On Friday 05 January 2007 6:32 am, Carlos E. R. wrote:
The Friday 2007-01-05 at 00:28 -0500, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
How can I track down the reason the mail isn't arriving?
Aha! The log contains this:
Jan 5 10:46:59 suillus postfix/smtp[7947]: 15FEE9CE00: to=<abrahams@acm.org>, relay=smtp.comcast.net[206.18.177.17]:25, delay=7.1, delays=6.5/0.02/0.42/0.16, dsn=5.0.0, status=bounced (host smtp.comcast.net[206.18.177.17] said: 550 [PERMFAIL] acm.org requires valid sender domain (in reply to RCPT TO command))
So the real problem seems to lie with the sender domain.
It depends. Does the server smtp.comcast.net require authentication for you to relay or does it simply check your ip and allows relaying based on that?
smtp.comcast.net does require usename/password authentication. But that requirement seems to have been met. It appears that the problem arises when comcast attempts to send a RCPT to the sender (see log entry above) and doesn't get a valid sender domain in response.
The sender address must be a real existing address. Use the address you expect others to answer to as the sender address, and you should not have a problem.
I tried "sendmail -F abrahams@acm.org abrahams@acm.org" but that didn't work either.
It is still possible that you will have to authenticate to the relayserver to be able to relay.
I think that part is working. It's the RCPT check that's failing.
To use smtp auth with postfix:
/etc/postfix/smtp_relayhost_auth: [smtp.comcast.net] username:password
Then execute "postmap /etc/postfix/smtp_relayhost_auth"
/etcp/postfix/main.cf: # square brackets around hostname to suppress mx lookup of relayhost relayhost = [smtp.comcast.net] smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/smtp_relayhost_auth smtp_sasl_security_options = noanonymous
After you have inserted these options, verify with the output of "postconf -n" that these options are active.
Then execute "postfix reload" to refresh the changed configuration. Now send a testmail with valid sender address and recipient address.
I did all that and still no luck. I had previously used the file sasl_passwd instead of smtp_relayhost_auth, but I assume that the filename doesn't matter, only the contents (and the fact that the .db file has been updated). Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Paul Abrahams wrote:
On Friday 05 January 2007 12:31 pm, Sandy Drobic wrote:
On Friday 05 January 2007 6:32 am, Carlos E. R. wrote:
The Friday 2007-01-05 at 00:28 -0500, Paul Abrahams wrote:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
How can I track down the reason the mail isn't arriving? Aha! The log contains this:
Jan 5 10:46:59 suillus postfix/smtp[7947]: 15FEE9CE00: to=<abrahams@acm.org>, relay=smtp.comcast.net[206.18.177.17]:25, delay=7.1, delays=6.5/0.02/0.42/0.16, dsn=5.0.0, status=bounced (host smtp.comcast.net[206.18.177.17] said: 550 [PERMFAIL] acm.org requires valid sender domain (in reply to RCPT TO command))
So the real problem seems to lie with the sender domain. It depends. Does the server smtp.comcast.net require authentication for you to relay or does it simply check your ip and allows relaying based on
Paul Abrahams wrote: that?
smtp.comcast.net does require usename/password authentication. But that requirement seems to have been met. It appears that the problem arises when comcast attempts to send a RCPT to the sender (see log entry above) and doesn't get a valid sender domain in response.
So, what sender address DID you use when the above log entry was made? acm.org seems to be handled by Postini, and it is possible that the comcast server tried to serve as proxy and immediately resend the smtp commands of your smtp client to the remote Postini server that is responsible for acm.org. Try to use a different destination address (not at acm.org) for another test. Do you get the same message back?
The sender address must be a real existing address. Use the address you expect others to answer to as the sender address, and you should not have a problem.
I tried "sendmail -F abrahams@acm.org abrahams@acm.org" but that didn't work either.
What did Postfix log about that? "didn't work" is not very helpful. (^-^) The logs show exactly what happened. Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 2:13 pm, Sandy Drobic wrote:
So, what sender address DID you use when the above log entry was made? acm.org seems to be handled by Postini, and it is possible that the comcast server tried to serve as proxy and immediately resend the smtp commands of your smtp client to the remote Postini server that is responsible for acm.org.
Try to use a different destination address (not at acm.org) for another test. Do you get the same message back?
The sender address must be a real existing address. Use the address you expect others to answer to as the sender address, and you should not have a problem.
I tried "sendmail -F abrahams@acm.org abrahams@acm.org" but that didn't work either.
What did Postfix log about that? "didn't work" is not very helpful. (^-^) The logs show exactly what happened.
Here are two commands and all the log entries that result from them. Note that I used a comcast address instead of an acm.org address as the sender the second time. It did not help. suillus:~ # sendmail -F abrahams@acm.org abrahams@acm.org ok, again . suillus:~ # sendmail -F pwabrahams@comcast.net pwabrahams@comcast.net test it once more. . suillus:~ # Jan 5 13:18:07 suillus postfix/pickup[9982]: A6BE89CE00: uid=0 from=<root> Jan 5 13:18:07 suillus postfix/cleanup[9996]: A6BE89CE00: message-id=<20070105181807.A6BE89CE00@suillus.localdomain> Jan 5 13:18:07 suillus postfix/qmgr[9981]: A6BE89CE00: from=<root@suillus.localdomain>, size=314, nrcpt=1 (queue active) Jan 5 13:18:08 suillus postfix/smtp[9998]: A6BE89CE00: to=<abrahams@acm.org>, relay=smtp.comcast.net[206.18.177.17]:25, delay=6.2, delays=5.7/0.02/0.39/0.16, dsn=5.0.0, status=bounced (host smtp.comcast.net[206.18.177.17] said: 550 [PERMFAIL] acm.org requires valid sender domain (in reply to RCPT TO command)) Jan 5 13:18:08 suillus postfix/cleanup[9996]: 61B7A9CE01: message-id=<20070105181808.61B7A9CE01@suillus.localdomain> Jan 5 13:18:08 suillus postfix/qmgr[9981]: 61B7A9CE01: from=<>, size=2211, nrcpt=1 (queue active) Jan 5 13:18:08 suillus postfix/bounce[9999]: A6BE89CE00: sender non-delivery notification: 61B7A9CE01 Jan 5 13:18:08 suillus postfix/qmgr[9981]: A6BE89CE00: removed Jan 5 13:18:08 suillus postfix/local[10000]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jan 5 13:18:08 suillus postfix/local[10000]: 61B7A9CE01: to=<pwa@suillus.localdomain>, orig_to=<root@suillus.localdomain>, relay=local, delay=0.16, delays=0.06/0.02/0/0.07, dsn=2.0.0, status=sent (delivered to mailbox) Jan 5 13:18:08 suillus postfix/qmgr[9981]: 61B7A9CE01: removed Jan 5 15:35:46 suillus postfix/pickup[21378]: 98B499BFD2: uid=0 from=<root> Jan 5 15:35:46 suillus postfix/cleanup[21918]: 98B499BFD2: message-id=<20070105203546.98B499BFD2@suillus.localdomain> Jan 5 15:35:46 suillus postfix/qmgr[9981]: 98B499BFD2: from=<root@suillus.localdomain>, size=329, nrcpt=1 (queue active) Jan 5 15:35:47 suillus postfix/smtp[21920]: 98B499BFD2: to=<pwabrahams@comcast.net>, relay=smtp.comcast.net[216.148.227.147]:25, delay=9.5, delays=8.8/0.03/0.45/0.26, dsn=5.0.0, status=bounced (host smtp.comcast.net[216.148.227.147] said: 550 [PERMFAIL] comcast.net requires valid sender domain (in reply to RCPT TO command)) Jan 5 15:35:47 suillus postfix/cleanup[21918]: 83D6213FCA: message-id=<20070105203547.83D6213FCA@suillus.localdomain> Jan 5 15:35:47 suillus postfix/qmgr[9981]: 83D6213FCA: from=<>, size=2253, nrcpt=1 (queue active) Jan 5 15:35:47 suillus postfix/local[21922]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled Jan 5 15:35:47 suillus postfix/bounce[21921]: 98B499BFD2: sender non-delivery notification: 83D6213FCA Jan 5 15:35:47 suillus postfix/qmgr[9981]: 98B499BFD2: removed Jan 5 15:35:47 suillus postfix/local[21922]: 83D6213FCA: to=<pwa@suillus.localdomain>, orig_to=<root@suillus.localdomain>, relay=local, delay=0.21, delays=0.1/0.02/0/0.09, dsn=2.0.0, status=sent (delivered to mailbox) Jan 5 15:35:47 suillus postfix/qmgr[9981]: 83D6213FCA: removed Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Paul Abrahams wrote:
What did Postfix log about that? "didn't work" is not very helpful. (^-^) The logs show exactly what happened.
Here are two commands and all the log entries that result from them. Note that I used a comcast address instead of an acm.org address as the sender the second time. It did not help.
suillus:~ # sendmail -F abrahams@acm.org abrahams@acm.org ok, again . suillus:~ # sendmail -F pwabrahams@comcast.net pwabrahams@comcast.net test it once more.
Jan 5 13:18:07 suillus postfix/pickup[9982]: A6BE89CE00: uid=0 from=<root> Jan 5 13:18:07 suillus postfix/cleanup[9996]: A6BE89CE00: message-id=<20070105181807.A6BE89CE00@suillus.localdomain> Jan 5 13:18:07 suillus postfix/qmgr[9981]: A6BE89CE00: from=<root@suillus.localdomain>, size=314, nrcpt=1 (queue active) ^^^^^^^^^^^^^^^^^^^^^^^^^ Here's your problem.
From "man sendmail": -F full_name Set the sender full name. This overrides the NAME environment variable, and is used only with messages that have no From: mesâ sage header. -f sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address. You need to set the envelope address. sendmail -f abrahams@acm.org abrahams@acm.org Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 3:48 pm, Sandy Drobic wrote:
Here's your problem.
From "man sendmail":
-F full_name Set the sender full name. This overrides the NAME environment variable, and is used only with messages that have no From: mesâ sage header.
-f sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address.
You need to set the envelope address.
sendmail -f abrahams@acm.org abrahams@acm.org
Thanks much, Sandy. That was the key -- but I'm not quite there yet. The lines: suillus:~ # sendmail -f abrahams@acm.org -F abrahams@acm.org abrahams@acm.org xxxyz . caused me to receive the following message: From: "abrahams@acm.org" <abrahams@acm.org> To: undisclosed-recipients:; xxxyz So I'm getting mail at last -- but the "from" and "to" aren't there. Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Paul Abrahams wrote:
On Friday 05 January 2007 3:48 pm, Sandy Drobic wrote:
Here's your problem.
From "man sendmail":
-F full_name Set the sender full name. This overrides the NAME environment variable, and is used only with messages that have no From: mesâ sage header.
-f sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address.
You need to set the envelope address.
sendmail -f abrahams@acm.org abrahams@acm.org
Thanks much, Sandy. That was the key -- but I'm not quite there yet. The lines:
suillus:~ # sendmail -f abrahams@acm.org -F abrahams@acm.org abrahams@acm.org xxxyz .
caused me to receive the following message:
From: "abrahams@acm.org" <abrahams@acm.org> To: undisclosed-recipients:;
xxxyz
So I'm getting mail at last -- but the "from" and "to" aren't there.
Of course not, where should they have come from? (^-^) The full smtp dialogue would look like this:
client server response # # comment from me (^-^) # telnet smtp.comcast.net 25 Trying 216.148.227.147... Connected to smtp.comcast.net. Escape character is '^]'. 220 comcast.net - Maillennium ESMTP/MULTIBOX rwcrmhc11 #9
ehlo japantest.homelinux.com
250-comcast.net 250-7BIT 250-8BITMIME 250-AUTH CRAM-MD5 LOGIN PLAIN 250-DSN 250-HELP 250-NOOP 250-PIPELINING 250-SIZE 15728640 250-STARTTLS 250-VERS V05.20c++ 250 XMVP 2
auth plain dGVzdHVzZXIAdGVzdHVzZXIAdGVzdHBhc3M=
235 2.0.0 Authentication successful
mail from:<abrahams@acm.org>
250 2.1.0 Ok # # Up to here we transmitted the smtp envelope. # This is NOT what you see in your mail!! DATA 354 End data with <CR><LF>.<CR><LF> # # This is the mail you actually see in your mailreader # # Part 1 is the mail header # # Part 2 is the body of the mail Subject: Testmail for relay From: Paul Abrahams <abrahams@acm.org> To: Paul Abrahams <abrahams@acm.org> Date: Fri, 5 Jan 2007 21:12:49 +0100 Message-Id: <200701052212.221414.abrahams@acm.org> # # empty line above separates the header from the body # The "From:" header line above is set with option "-F" on the # command line Hello, here's the testmail! [return] . [return] 250 2.0.0 Ok: queued as 606753F328
quit
250 2.1.5 Ok That is how the server sees the SMTP submission of a mail. In your example you haven't set the header lines from: and to, so the Postfix daemon "cleanup" inserted the necessary headers. If no from: header is set cleanup will use the smtp envelope address as from: header, if no to: header is set, Postfix will use "undisclosed recipients". As you can see the addresses in the mail header are not very reliable. (^-^) Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Paul Abrahams wrote:
I've done all that and I get no error messages -- but no mail arrives when I issue the command
sendmail abrahams@acm.org this is a test message .
This is not likely to succeed, as it is not a correct sendmail call. The mail header is missing and even if the mail is delivered to the receiving MTA, that receiver is likely to drop it. Try: sendmail -t -v From: <mbox@example.com> To: <mbox@example.com> Subject: test test . -t takes sender and recipient from the email headers. -v will cause Postfix to email a mail delivery status report to your local account, too. You can also use mail(1) to test sending, without any further configuration it uses sendmail and constructs a correct mail header. echo test | mail -v -s subject recipient@example.com
How can I track down the reason the mail isn't arriving?
/var/log/mail*, depending on your syslog configuration. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Paul Abrahams <abrahams@acm.org> [01-05-07 00:33]:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
BUT, where have you set: relayhost = smtp.comcast.net then, of course: postfix reload -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 06:06, Patrick Shanahan wrote:
* Paul Abrahams <abrahams@acm.org> [01-05-07 00:33]:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
BUT, where have you set: relayhost = smtp.comcast.net then, of course: postfix reload
-- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/
Why do you keep talking about sendmail and postfix, these are both MTA's. You either use one or the other. Mike -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 11:38, Mike Noble wrote:
On Friday 05 January 2007 06:06, Patrick Shanahan wrote:
* Paul Abrahams <abrahams@acm.org> [01-05-07 00:33]:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application [...] Why do you keep talking about sendmail and postfix, these are both MTA's. You either use one or the other.
Mike
Not strictly true....sendmail is program that is part of the Postfix package (on my OpenSUSE 10.1 system): jlc:~ # which sendmail /usr/sbin/sendmail jlc:~ # rpm -qf !$ rpm -qf `which sendmail` postfix-2.2.9-10 'man sendmail' will show a page describing the Sendmail to Postfix compatibility interface. Jim -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Mike Noble <mgnoble@gmail.com> [01-05-07 14:47]:
On Friday 05 January 2007 06:06, Patrick Shanahan wrote:
* Paul Abrahams <abrahams@acm.org> [01-05-07 00:33]:
I'm trying to send mail through my ISP using sendmail (postfix under the covers). I have to use sendmail because the actual application is the PHP5 "mail" command, and that command uses sendmail. My ISP requires a username and password to accept the relay; this protocol goes under the name of SMTP AUTH.
BUT, where have you set: relayhost = smtp.comcast.net then, of course: postfix reload
Why do you keep talking about sendmail and postfix, these are both MTA's. You either use one or the other.
Are you responding to my post or Paul's? I said nothing about sendmail, BUT, postfix uses a small binary called sendmail to post mail. Which is the sendmail Paul is referring. Postfix is the MTA in this case. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 OpenSUSE Linux http://en.opensuse.org/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 2:38 pm, Mike Noble wrote:
Why do you keep talking about sendmail and postfix, these are both MTA's. You either use one or the other.
I believe that sendmail is a "wrapper" for postfix, so the sendmail command calls upon the postfix machinery. From the sendmail manpage: The Postfix sendmail(1) command implements the Postfix to Sendmail compatibility interface. For the sake of compatibility with existing applications, some Sendmail command-line options are recognized but silently ignored. The old sendmail command probably lives somewhere, but it's well hidden. Paul -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 05 January 2007 10:38, Mike Noble wrote:
Why do you keep talking about sendmail and postfix, these are both MTA's. You either use one or the other.
Mike
Mike: Sendmail is also a command that has been in just about every linux since dirt. It has nothing to do with Sendmail the MTA. If you run a postfix machine you still a sendmail program installed and a man page for it. Its supplied by the Postfix package as a compatibility feature because so much software requires it. -- _____________________________________ John Andersen
participants (8)
-
Carlos E. R.
-
Jim Cunning
-
Joachim Schrod
-
John Andersen
-
Mike Noble
-
Patrick Shanahan
-
Paul Abrahams
-
Sandy Drobic