Hi,
On my FC1 I'm able to receive & send mails using thunderbird but sending mail by /bin/mail does not work.
I'm using a MTNL dialup account. I use fetchmail+postfix to receive my mail at /var/mail/<username> which I read using thunderbird. In thunderbird I have configured smtp.mtnl.net.in as my outgoing server which can delivery mails successfully (I have also provided my mtnl username & password in my thunderbird smtp setup).
When I tried to send mail using "mail -s <testing> <recipient>" style command, the /var/log/maillog shows this:
<--------> Mar 5 21:09:02 nova postfix/nqmgr[629]: B812AA3BE: from=soumen@localhost.localdomain, size=309, nrcpt=1 (queue active) Mar 5 21:09:02 nova postfix/nqmgr[629]: 0D49BA3C1: from=soumen@localhost.localdomain, size=406, nrcpt=1 (queue active) Mar 5 21:09:03 nova postfix/smtp[24405]: connect to smtp.mtnl.net.in[202.159.228.8]: No route to host (port 25) Mar 5 21:09:03 nova postfix/smtp[24405]: B812AA3BE: to=dass_soumen@yahoo.com, relay=none, delay=731, status=deferred (connect to smtp.mtnl.net.in[202.159.228.8]: No route to host) Mar 5 21:09:06 nova postfix/smtp[24406]: connect to smtp.mtnl.net.in[202.159.228.8]: No route to host (port 25) Mar 5 21:09:06 nova postfix/smtp[24406]: 0D49BA3C1: to=dass_soumen@yahoo.com, relay=none, delay=460, status=deferred (connect to smtp.mtnl.net.in[202.159.228.8]: No route to host) <-------->
Output of mailq is :
<--------> -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient------- B812AA3BE 309 Sat Mar 5 20:56:52 soumen@localhost.localdomain (connect to smtp.mtnl.net.in[202.159.228.8]: No route to host) dass_soumen@yahoo.com
0D49BA3C1 406 Sat Mar 5 21:01:26 soumen@localhost.localdomain (connect to smtp.mtnl.net.in[202.159.228.8]: No route to host) dass_soumen@yahoo.com
-- 1 Kbytes in 2 Requests. <-------->
Output of route is:
<--------> Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 203.94.227.17 * 255.255.255.255 UH 0 0 0 ppp0 169.254.0.0 * 255.255.0.0 U 0 0 0 lo 127.0.0.0 * 255.0.0.0 U 0 0 0 lo default 203.94.227.17 0.0.0.0 UG 0 0 0 ppp0 <-------->
My impression of the above is that, mail is not able to find the route using which it should deliver the mail to the smtp server. But route is showing a default route (I use "defaultroute" option in my ppp options).
How can I investigate this better? I'll be glad to post any other necessary information.
-- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
Can't open /usr/fortunes. Lid stuck on cookie jar.
-- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
UNIX was half a billion (500000000) seconds old on Tue Nov 5 00:53:20 1985 GMT (measuring since the time(2) epoch). -- Andy Tannenbaum
-- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
Each of these cults correspond to one of the two antagonists in the age of Reformation. In the realm of the Apple Macintosh, as in Catholic Europe, worshipers peer devoutly into screens filled with "icons." All is sound and imagery and Appledom. Even words look like decorative filigrees in exotic typefaces. The greatest icon of all, the inviolable Apple itself, stands in the dominate position at the upper-left corner of the screen. A central corporate headquarters decrees the form of all rites and practices. Infalliable doctrine issues from one executive officer whose selection occurs in a sealed boardroom. Should anyone in his curia question his powers, the offender is excommunicated into outer darkness. The expelled heretic founds a new company, mutters obscurely of the coming age and the next computer, then disappears into silence, taking his stockholders with him. The mother company forbids financial competition as sternly as it stifles ideological competition; if you want to use computer programs that conform to Apple's orthodoxy, you must buy a computer made and sold by Apple itself. -- Edward Mendelson, "The New Republic", February 22, 1988
Sometime Today, SD cobbled together some glyphs to say:
On my FC1 I'm able to receive & send mails using thunderbird but sending mail by /bin/mail does not work.
Configure sendmail or whatever is your local MTA to use a smart host. This is the same as what you've set in thunderbird as your smtp server.
/bin/mail uses the local sendmail program to send mail so that needs to know how to get to the internet.
Additionally, if your sendmail runs as a smtp daemon, you can tell thunderbird to use localhost:25 as your smtp server. This will allow you to send mails even when offline. Sendmail will queue them and send them when you connect to the internet.
Also, please don't use insanely large signatures. Internet netiquette dictates that signatures be no longer than 4 lines of no more than 80 characters each (so approx max 320 characters in a sig).
Philip Tellis wrote:
Sometime Today, SD cobbled together some glyphs to say:
Also, please don't use insanely large signatures. Internet netiquette dictates that signatures be no longer than 4 lines of no more than 80 characters each (so approx max 320 characters in a sig).
I'm sorry for that. Happened due to a thunderbird extension which adds a signature every time one clicks on the send button (even if the mail delivery fails). -- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
Soumen Dass wrote:
When I tried to send mail using "mail -s <testing> <recipient>" style command, the /var/log/maillog shows this:
Mar 5 21:09:06 nova postfix/smtp[24406]: 0D49BA3C1: to=dass_soumen@yahoo.com, relay=none, delay=460, status=deferred (connect to smtp.mtnl.net.in[202.159.228.8]: No route to host)
Well, I have an update. I don't know how but after disconnecting once & then retrying with the new connection postfix managed to find the route (??).
However, despite my chaging the From: & Reply-To: headers to my MTNL e-mail addresses, the mail was bounced by the MTNL smtp server:
<---------> Mar 5 21:46:27 nova postfix/nqmgr[629]: 0D49BA3C1: from=soumen@localhost.localdomain, size=406, nrcpt=1 (queue active) Mar 5 21:46:31 nova postfix/smtp[27986]: 0D49BA3C1: to=dass_soumen@yahoo.com, relay=smtp.mtnl.net.in[202.159.228.8], delay=2705, status=bounced (host smtp.mtnl.net.in[202.159.228.8] said: 550 5.1.8 invalid/host-not-in-DNS return address not allowed (in reply to MAIL FROM command)) <--------->
What could be reason behind the rejection despite my re-writing the From/Reply-To headers? What changes should I look at to avoid bouncing of messages?
-- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
Sometime on Mar 5, SD cobbled together some glyphs to say:
However, despite my chaging the From: & Reply-To: headers to my MTNL e-mail addresses, the mail was bounced by the MTNL smtp server:
You've got to change the envelope header. I don't know how to do this with postfix, perhaps devdas can help. If you need help with sendmail, see http://db.ilug-bom.org.in/lug-authors/philip/docs/Hdr-Env-Masq-miniHOWTO.txt
On 06/03/05 01:40 +0530, Philip Tellis wrote:
Sometime on Mar 5, SD cobbled together some glyphs to say:
However, despite my chaging the From: & Reply-To: headers to my MTNL e-mail addresses, the mail was bounced by the MTNL smtp server:
You've got to change the envelope header. I don't know how to do this with postfix, perhaps devdas can help. If you need help with sendmail, see http://db.ilug-bom.org.in/lug-authors/philip/docs/Hdr-Env-Masq-miniHOWTO.txt
For envelop senders only, virtual_alias_maps. For envelop and headers, canonical_maps. For SMTP AUTH, http://www.postfix.org/SASL_README.html (See the smtp_* section). Normally though, if you authenticate, you should not need to set the envelop sender.
Devdas Bhagat
Devdas Bhagat wrote:
On 06/03/05 01:40 +0530, Philip Tellis wrote:
Sometime on Mar 5, SD cobbled together some glyphs to say:
However, despite my chaging the From: & Reply-To: headers to my MTNL e-mail addresses, the mail was bounced by the MTNL smtp server:
You've got to change the envelope header. I don't know how to do this with postfix, perhaps devdas can help. If you need help with sendmail,
For envelop senders only, virtual_alias_maps. For envelop and headers, canonical_maps. For SMTP AUTH, http://www.postfix.org/SASL_README.html (See the smtp_* section). Normally though, if you authenticate, you should not need to set the envelop sender.
Devdas Bhagat
Thanks guys. Seems like I've got some reading to do. -- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]
You will lose an important disk file.
Devdas Bhagat wrote:
On 06/03/05 01:40 +0530, Philip Tellis wrote:
Sometime on Mar 5, SD cobbled together some glyphs to say:
However, despite my chaging the From: & Reply-To: headers to my MTNL e-mail addresses, the mail was bounced by the MTNL smtp server:
You've got to change the envelope header. I don't know how to do this with postfix, perhaps devdas can help. If you need help with sendmail,
For envelop senders only, virtual_alias_maps. For envelop and headers, canonical_maps. For SMTP AUTH, http://www.postfix.org/SASL_README.html (See the smtp_* section). Normally though, if you authenticate, you should not need to set the envelop sender.
News: I have been able to configure postfix so now I can send mail from command line (in addition to thunderbird). Plus, as Philip suggested, I have now configured thunderbird to hand my outgoing mails to postfix running on localhost:25 which in turn hands them over to MTNL relay :) Works beautifully.
The changes were implemented by adding smtp_sasl configs (as described in the web link suggested by Devdas) in main.cf, creating sasl_passwd & sender_canonical table entries (would be glad to post if anyone needs them).
I just have a few nagging questions after this exercise:
The login on my machine is "soumen" & my mtnl user name is "soumen_dass". Now... 1. Is it the right practice to use the combination of $myorigin = mtnl.net.in & soumen -> soumen_dass in sender_canonical or leave $myorigin uninitialised & soumen -> soumen_dass@mtnl.net.in (current setting) Both approaches are working (except in the latter even local mails (from cron etc.) are getting routed through MTNL).
2. Devdas mentioned about not needing to set the envelop sender if I'm using SMTP auth with MTNL. But MTNL rejects my mails (reason : "550 Faking email-id not allowed") unless I re-write my envelop and headers.
I have understood that this is a vast area. The documentation on postfix.org can tire a marathon runner :) However, this effort has been quite exciting for me. My thanks to Philip & Devdas for their help. -- Soumen Dass [Registered Linux User # 272639 - Linux nova 2.4.22-1.2115.nptl i686]