![]() |
Sending email with postfix, relay host, STARTTLS problem?
Hi, I have setup a (ISP config) server following the steps in http://howtoforge.org/perfect-server...04-ispconfig-3
I want to send email using my isp providers smtp server (smtp.live.com). I have edited /etc/postfix/main.cf and added/changed relayhost = smtp.live.com smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd When trying to send email I get this in mail.log Aug 25 16:56:15 isp1 postfix/smtp[10711]: B3423E220A: to=<tottek@gmail.com>, relay=smtp.live.com[65.55.172.254]:25, delay=0.67, delays=0.03/0.09/0.44/0.12, dsn=5.7.0, status=bounced (host smtp.live.com[65.55.172.254] said: 530 5.7.0 Must issue a STARTTLS command first (in reply to MAIL FROM command)) Aug 25 16:56:15 isp1 postfix/cleanup[10690]: 8ACA7E2220: message-id=<20090825235615.8ACA7E2220@isp1.monkisoft.com> Anyone knowing the steps to get this working with the ISPConfig 3 setup? Thanks, totte |
Can you run
Code:
telnet localhost 25Code:
ehlo localhostWhat's the output? |
Here is the output;
Code:
tk@isp1:~$ telnet localhost 25Here is my main.cf: Code:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) |
Looks ok to me... :confused:
|
I got it working!
Here is what I changed. In the main.cf, shown above, changed/added the following lines #changed from no to yes (may not matter for sending mail?) smtpd_tls_auth_only = yes #Added this line smtp_tls_security_level = may I also found a problem in my sasl passwd file: [smtp.live.com] 'useraccountname:my password' However, I still have the following problems. If I send an email from a ssh shell, the email from address is 'myloginname'@isp1.example.com. I can't figure out where isp1.example.com comes from. If I send email using squirrel mail from an account created with ispconfig(3), the email "from" domain is correct. Also, in the mail.log file, I get this "warning" for each mail that is relayed: Aug 27 10:30:58 isp1 postfix/smtp[26534]: certificate verification failed for smtp.live.com[65.55.172.254]:25: untrusted issuer /C=US/O=GTE Corporation/OU=GTE CyberTrust Solutions, Inc./CN=GTE CyberTrust Global Root Not sure how to get rid of that, not sure if I want since mail sending does work now. Anyone knows where to set example.com to my correct domain? Thanks, totte |
You must always set the correct sender address in your email client (Outlook, Thunderbird, webmail, on the command line, etc.). What command did you use to send the email? Did you take a look at its man page to find out how to set the sender address?
|
Thanks Falko,
There is no problem with Thunderbird or Outlook, they both send email fine. It is from a command prompt, on the actual hosting machine, using the mail command, i.e. tk@isp1:~$ echo "Hello" | mail -s"a subject" ToSomeEmailAddress The hostname is isp1.monkisoft.com and my username is tk. In the received mail on the other end, the from address is tk@isp1.example.com, not isp1.monkisoft.com. Any help is appreciated, totte |
I guess you can set the sender with the -a switch. See
Code:
man mail |
Thanks for suggestion, but I do suspect the the mail "from address" domain is taken from /etc/mailname which contains isp1.example.com at the moment.
Can I just edit it with vi, or do I need to reconfigure something. Can I change it from within ISPConfig 3? Thanks, totte |
If the sender address is the only issue you're having, I'd not change the name of the mailserver - you might get yourself into trouble.
Quote:
|
| All times are GMT +2. The time now is 21:58. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.