LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2008, 10:06 AM   #1
degaray
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Rep: Reputation: 0
Configuring Postfix for outgoing email


Hi everyone, I would really apreciate your help. My issue is that I have installed Trixbox 2.6 and everything seems to be working just fine, but when someone calls an extension and records a voice mail message, the message can be heard dialing the code but it does never go to the email account. I actually stays forever on queue on postfix. I have tried to configure postfix, and I just cannot. What should I do, I am stucked.
 
Old 08-01-2008, 10:22 AM   #2
degaray
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Additional information

My smtp server requires authentication, and it has to be set to port 2525 instead of 25.
 
Old 08-01-2008, 10:26 AM   #3
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
if you need help getting postfix to send mail you should post the output of postconf -n here. postconf -n will generate a list of configurations settings that are NOT default settings, allowing us to see what has been changed.

please do not post the full postfix configuration file as that will be far too long and difficult to go through.
 
Old 08-01-2008, 10:30 AM   #4
degaray
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Here it is:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
myhostname = trixbox1.localdomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relayhost = mail.comercialdomestica.com:2525
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_always_send_ehlo = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
smtp_sasl_security_options =
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
smtpd_sasl_auth_enable = no
unknown_local_recipient_reject_code = 550
 
Old 08-01-2008, 01:44 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Show the mail log messages for a particular queue ID that is stuck in the queue.
 
Old 08-01-2008, 04:21 PM   #6
degaray
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
queue information

Here is the information that you ask me, thank you in advance:

Aug 1 16:14:27 trixbox1 postfix/pickup[28723]: 63CCC15794C7: uid=102 from=<asterisk>
Aug 1 16:14:27 trixbox1 postfix/cleanup[28749]: 63CCC15794C7: message-id=<Asterisk-3-1920957076-121-3256@trixbox1.localdomain>
Aug 1 16:14:27 trixbox1 postfix/qmgr[28437]: 63CCC15794C7: from=<asterisk@trixbox1.localdomain>, size=11932, nrcpt=1 (queue active)
Aug 1 16:14:39 trixbox1 postfix/smtp[28754]: fatal: open database /etc/postfix/saslpasswd.db: No such file or directory
Aug 1 16:14:40 trixbox1 postfix/master[28435]: warning: process /usr/libexec/postfix/smtp pid 28754 exit status 1
Aug 1 16:14:40 trixbox1 postfix/master[28435]: warning: /usr/libexec/postfix/smtp: bad command startup -- throttling
Aug 1 16:15:40 trixbox1 postfix/smtp[28755]: fatal: open database /etc/postfix/saslpasswd.db: No such file or directory
 
Old 08-01-2008, 05:09 PM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
The smtp client cannot send the mail because the saslpasswd database specified in your main.cf

Code:
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
does not exist:

Code:
fatal: open database /etc/postfix/saslpasswd.db: No such file or directory
Did you create /etc/postfix/saslpasswd and then postmap it ?:

Code:
postmap /etc/postfix/saslpasswd
 
1 members found this post helpful.
Old 08-04-2008, 11:49 AM   #8
degaray
LQ Newbie
 
Registered: Jul 2008
Posts: 5

Original Poster
Rep: Reputation: 0
Corrected

Thank you very much. That was the problem.
 
Old 08-19-2008, 05:01 PM   #9
kimkhan
LQ Newbie
 
Registered: May 2004
Location: Toronto
Distribution: CentOS, Linux Mint Debian and Linux Mint 12 KDE
Posts: 5

Rep: Reputation: 1
I am having similar issue where I can't relay email

Here is my postfix configuration:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = homelinux.com
myhostname = mydomain.homelinux.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
relayhost = [smtp.broadband.rogers.com]
sample_directory = /usr/share/doc/postfix-2.2.10/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_always_send_ehlo = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
smtp_sasl_security_options = nonanonymous
smtpd_sasl_auth_enable = yes
unknown_local_recipient_reject_code = 550


Here is my maillog:

Aug 19 17:51:37 asterisk1 postfix/pickup[6675]: ED3AAAF273: uid=100 from=<asterisk>
Aug 19 17:51:37 asterisk1 postfix/cleanup[7553]: ED3AAAF273: message-id=<Asterisk-1-517774489-206-3032@asterisk1.local>
Aug 19 17:51:38 asterisk1 postfix/qmgr[6676]: ED3AAAF273: from=<asterisk@mydomain.homelinux.com>, size=753, nrcpt=1 (queue active)
Aug 19 17:51:38 asterisk1 postfix/smtp[7556]: warning: database /etc/postfix/saslpasswd.db is older than source file /etc/postfix/saslpasswd
Aug 19 17:51:38 asterisk1 postfix/smtp[7556]: ED3AAAF273: to=<kimkhan@rogers.com>, relay=smtp-rog.mail.yahoo.com[206.190.36.18], delay=1, status=bounced (host smtp-rog.mail.yahoo.com[206.190.36.18] said: 530 authentication required - for help go to http://help.yahoo.com/help/us/mail/pop/pop-11.html (in reply to MAIL FROM command))
Aug 19 17:51:38 asterisk1 postfix/cleanup[7553]: 51D32AF274: message-id=<20080819215138.51D32AF274@mydomain.homelinux.com>
Aug 19 17:51:38 asterisk1 postfix/qmgr[6676]: 51D32AF274: from=<>, size=2862, nrcpt=1 (queue active)
Aug 19 17:51:38 asterisk1 postfix/qmgr[6676]: ED3AAAF273: removed
Aug 19 17:51:38 asterisk1 postfix/local[7559]: 51D32AF274: to=<asterisk@mydomain.homelinux.com>, relay=local, delay=0, status=sent (delivered to mailbox)
 
1 members found this post helpful.
Old 08-19-2008, 05:13 PM   #10
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
No, your issue is different:

Aug 19 17:51:38 asterisk1 postfix/smtp[7556]: warning: database /etc/postfix/saslpasswd.db is older than source file /etc/postfix/saslpasswd

You need to postmap the saslpasswd file after changing it:

postmap /etc/postfix/saslpasswd
postfix reload
 
1 members found this post helpful.
Old 09-30-2009, 11:19 AM   #11
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Rep: Reputation: 15
I'm having similar issues as shown above and this has become increasingly frustrating. I'm also using Trixbox, 2.8 in my case and my ISP is rogers. Can't seem to figure out why I can't get relay working properly. I've tried using smtp.broadband.rogers.com as well as smtp-rog.mail.yahoo.com on both port 25 and 465.. nothing seems to work. I know it's not an authentication problem as I am able to use thunderbird without any issues.. any help would be appreciated!

tail /var/log/maillog

Sep 30 12:08:45 trixbox1 postfix/pickup[3230]: 1AA002CF592: uid=0 from=<root>
Sep 30 12:08:45 trixbox1 postfix/cleanup[3236]: 1AA002CF592: message-id=<20090930160845.1AA002CF592@trixbox1.localdomain>
Sep 30 12:08:45 trixbox1 postfix/qmgr[3231]: 1AA002CF592: from=<root@trixbox1.localdomain>, size=373, nrcpt=1 (queue active)
Sep 30 12:08:45 trixbox1 postfix/smtp[3238]: warning: valid_hostname: empty hostname
Sep 30 12:08:45 trixbox1 postfix/smtp[3238]: warning: malformed domain name in resource data of MX record for smtp-rog.mail.yahoo.com:
Sep 30 12:08:45 trixbox1 postfix/smtp[3238]: warning: relayhost configuration problem
Sep 30 12:08:45 trixbox1 postfix/smtp[3238]: 1AA002CF592: to=<testing3@gmail.com>, relay=none, delay=0.1, delays=0.05/0.04/0.01/0, dsn=4.3.5, status=deferred (Name service error for name=smtp-rog.mail.yahoo.com type=MX: Malformed or unexpected name server reply)

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relayhost = smtp-rog.mail.yahoo.com:25
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options =
smtp_use_tls = yes
unknown_local_recipient_reject_code = 550


Thank you in advance!
 
Old 09-30-2009, 11:38 AM   #12
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Originally Posted by chris View Post
Sep 30 12:08:45 trixbox1 postfix/smtp[3238]: warning: valid_hostname: empty hostname
There is not a valid hostname set on your machine. Set $myhostname appropriately. Seem man 5 postconf:

Code:
myhostname (default: see postconf -d output)
       The internet hostname of this mail system. The default is  to  use  the
       fully-qualified  domain name from gethostname(). $myhostname is used as
       a default value for many other configuration parameters.

       Example:

       myhostname = host.example.com
 
Old 09-30-2009, 12:00 PM   #13
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Rep: Reputation: 15
Thank you for the reply Mr. C,

So I have added the following hostname assuming this would be valid:

trixbox1.localdomain.com

# hostname
trixbox1.localdomain.com

# postconf -n |grep myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
myhostname = trixbox1.localdomain.com

I'm still getting the same errors however:

Sep 30 12:50:29 trixbox1 postfix/pickup[3317]: E53DE2CF594: uid=0 from=<root>
Sep 30 12:50:29 trixbox1 postfix/cleanup[3327]: E53DE2CF594: message-id=<20090930165029.E53DE2CF594@trixbox1.localdomain.com>
Sep 30 12:50:29 trixbox1 postfix/qmgr[3312]: E53DE2CF594: from=<root@trixbox1.localdomain.com>, size=385, nrcpt=1 (queue active)
Sep 30 12:50:29 trixbox1 postfix/smtp[3314]: warning: valid_hostname: empty hostname
Sep 30 12:50:29 trixbox1 postfix/smtp[3314]: warning: malformed domain name in resource data of MX record for smtp-rog.mail.yahoo.com:
Sep 30 12:50:29 trixbox1 postfix/smtp[3314]: warning: relayhost configuration problem
Sep 30 12:50:29 trixbox1 postfix/smtp[3314]: E53DE2CF594: to=<testing3@gmail.com>, relay=none, delay=0.03, delays=0.02/0/0.01/0, dsn=4.3.5, status=deferred (Name service error for name=smtp-rog.mail.yahoo.com type=MX: Malformed or unexpected name server reply)

Thanks!
 
Old 09-30-2009, 01:10 PM   #14
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
If you are using Yahoo as a relay host, you don't need to perform the MX lookup for that known relayhost hostname. Use brackets around your relayhost hostname to prevent MX lookups:

Code:
relayhost = [smtp-rog.mail.yahoo.com]:2525
Note: since the host you are using to relay has no valid MX (hence the warnings), MX lookups on that hostname are pointless and futile:

Code:
$ host smtp-rog.mail.yahoo.com
smtp-rog.mail.yahoo.com has address 206.190.36.18
smtp-rog.mail.yahoo.com mail is handled by 0 .
 
Old 09-30-2009, 01:44 PM   #15
chris
Member
 
Registered: Nov 2001
Location: Toronto, Canada
Distribution: CentOS 4
Posts: 66

Rep: Reputation: 15
Much appreciate the help Mr. C. What you say makes sense and so I wanted to make the necessary changes with two questions as a result.

1) I have seen so many different posts with regards to relaying to yahoo mail servers and each suggesting different ports. I've seen 25, 387, 465 and now 2525. You mentioned 2525, I suspect this is the correct one?

2) Trixbox has a little TUI that helps configure postfix, it prompts for SMTP, UNAME & PASSWD and then configures main.cf accordingly. The issue, changes I make to main.cf don't seem to stick after saving and reloading. IE. I went in to change the relayhost to relayhost = [smtp-rog.mail.yahoo.com]:2525 as you suggested but when I did a postconf -n, it still printed the previous value. Is there something else I should do once making changes to main.cf?

Oh actually one last point. /etc/postfix/sasl_passsword, should I also have brackets and port stated in here.


[smtp-rog.mail.yahoo.com]:2525 uanme@rogers.comasswd ?

Thanks so much for all the assistance Mr. C, this has actually been driving me nuts for a few days now!

Chris
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My outgoing email is getting flagged as spam timyaukey Linux - Server 1 09-17-2007 06:35 PM
Postfix how to set outgoing interface/IP? spadesmaster Fedora 2 02-10-2007 02:05 PM
postfix outgoing port ? taiwf Linux - Software 4 07-06-2006 10:59 AM
Outgoing Only mail server using Postfix opnsrc Linux - Networking 0 06-15-2006 10:37 AM
Editing outgoing email content senthil Linux - Software 0 06-13-2003 07:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration