Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Aug 02, 2009 9:49 am 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Hello,

I set up a linode to be a mail server. Debian Lenny + postfix + dovecot + mysql + virtual mailboxes + Imap.
A user wants to use his Mac's Mail application to get to his mails. Reading the mail works but sending emails does not.
In the preferences of the Mail app, username and password are easy; the email account and its password.
(1) But, what is the "server name"?
(2) Can it be the default li103-217.members.linode.com?
(3) Do I have to rename that fully-qualified hostname?
(4) Assuming I own the domain example.com, could I user something like smtp.example.com? What kind of DNS entries should I make for that?

Thanks


Top
   
PostPosted: Sun Aug 02, 2009 12:10 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
jcr wrote:
(1) But, what is the "server name"?

Don't really understand the question. My version of Mail (3.6 - the current version) asks for Incoming Mail Server: (sounds like you have that set up OK) and Outgoing Mail Server (SMTP): - this need to be the name or IP address of an SMTP server.

Image

jcr wrote:
(2) Can it be the default li103-217.members.linode.com?

Yes - but it needs to match the 'mydomain =' and 'myhostname =' directives in the postfix main.cf file.

jcr wrote:
(3) Do I have to rename that fully-qualified hostname?

Not necessarily - see (2).

jcr wrote:
(4) Assuming I own the domain example.com, could I user something like smtp.example.com? What kind of DNS entries should I make for that?

Yes.
Code:
smtp.example.com.   7200   IN   A   97.107.142.217

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Sun Aug 02, 2009 1:41 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Hi Peter,

Thank for your help. Let me give a bit more of background.
On the server, I have several domains (virtual_mailbox_domains is defined) and the incoming mail servers are:
mail.example.com
mail.foo.com
...
All works very well, except for the sending email from a local app like Mail with IMAP.

Ideally, the outgoing email servers would also be
mail.example.com
mail.foo.com
with the appropriate email /password

how could that work?

In any case, I followed your advice and adjusted my main.cf file:
I already had:
myhostname = liXX-231.members.linode.com
and I added
mydomain = liXX-231.members.linode.com
but that does not work any better.

Thanks again!


Top
   
 Post subject:
PostPosted: Sun Aug 02, 2009 3:15 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
IMAP isn't involved in sending mail, so the title of this thread might be a little confusing. Mail is sent using SMTP, which puts it in the realm of Postfix.

What happens when you try to send mail from a client? Any error messages? What shows up in Postfix's log file?


Top
   
 Post subject:
PostPosted: Sun Aug 02, 2009 5:30 pm 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
The Mac's Mail app returns "The smtp server xxx is not responding..."

When I ping that server, it seems responsive though


Top
   
 Post subject:
PostPosted: Sun Aug 02, 2009 7:17 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
If you do "netstat -nlp" on the server, where is postfix listening? (This will usually show up with "master" as the process name.)

Which port is Mail.app trying to connect to? Can you successfully "telnet your.server 25" and/or "telnet your.server 587" from your Mac?


Top
   
 Post subject:
PostPosted: Mon Aug 03, 2009 7:33 am 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
Hoopycat,

I believe that postfix is listening to port 25. I am pasting the report below in case I am misreading it.

That's interesting because doing:

telnet server's ip 25
returns
Operation timed out
telnet: Unable to connect to remote host

telnet server's ip 587
returns
Connection refused
telnet: Unable to connect to remote host






Code:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0 0.0.0.0:21                  0.0.0.0:*                   LISTEN      2376/vsftpd         
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2340/cupsd         
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      2464/master         
tcp        0      0 :::993                      :::*                        LISTEN      2386/dovecot       
tcp        0      0 :::110                      :::*                        LISTEN      2386/dovecot       
tcp        0      0 :::143                      :::*                        LISTEN      2386/dovecot       
tcp        0      0 :::80                       :::*                        LISTEN      2477/httpd         
tcp        0      0 :::22                       :::*                        LISTEN      2330/sshd           
udp        0      0 0.0.0.0:68                  0.0.0.0:*                               2227/dhclient       
udp        0      0 0.0.0.0:631                 0.0.0.0:*                               2340/cupsd         
udp        0      0 67.18.186.231:123           0.0.0.0:*                               2364/ntpd           
udp        0      0 127.0.0.1:123               0.0.0.0:*                               2364/ntpd           
udp        0      0 0.0.0.0:123                 0.0.0.0:*                               2364/ntpd           
udp        0      0 fe80::fcfd:43ff:fe1:123     :::*                                    2364/ntpd           
udp        0      0 ::1:123                     :::*                                    2364/ntpd           
udp        0      0 :::123                      :::*                                    2364/ntpd           
Active UNIX domain sockets (only servers)
Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
unix  2      [ ACC ]     STREAM     LISTENING     4839   2340/cupsd          /var/run/cups/cups.sock
unix  2      [ ACC ]     STREAM     LISTENING     5347   2464/master         public/cleanup
unix  2      [ ACC ]     STREAM     LISTENING     4970   2386/dovecot        /var/run/dovecot/dict-server
unix  2      [ ACC ]     STREAM     LISTENING     5641   2538/saslauthd      /var/run/saslauthd/mux
unix  2      [ ACC ]     STREAM     LISTENING     4972   2386/dovecot        /var/run/dovecot/login/default
unix  2      [ ACC ]     STREAM     LISTENING     4978   2386/dovecot        /var/run/dovecot/auth-worker.2389
unix  2      [ ACC ]     STREAM     LISTENING     5030   2389/dovecot-auth   /var/spool/postfix/private/auth
unix  2      [ ACC ]     STREAM     LISTENING     5354   2464/master         private/tlsmgr
unix  2      [ ACC ]     STREAM     LISTENING     5358   2464/master         private/rewrite
unix  2      [ ACC ]     STREAM     LISTENING     5362   2464/master         private/bounce
unix  2      [ ACC ]     STREAM     LISTENING     5366   2464/master         private/defer
unix  2      [ ACC ]     STREAM     LISTENING     5370   2464/master         private/trace
unix  2      [ ACC ]     STREAM     LISTENING     5374   2464/master         private/verify
unix  2      [ ACC ]     STREAM     LISTENING     5378   2464/master         public/flush
unix  2      [ ACC ]     STREAM     LISTENING     5382   2464/master         private/proxymap
unix  2      [ ACC ]     STREAM     LISTENING     5386   2464/master         private/smtp
unix  2      [ ACC ]     STREAM     LISTENING     5390   2464/master         private/relay
unix  2      [ ACC ]     STREAM     LISTENING     5394   2464/master         public/showq
unix  2      [ ACC ]     STREAM     LISTENING     5398   2464/master         private/error
unix  2      [ ACC ]     STREAM     LISTENING     5402   2464/master         private/discard
unix  2      [ ACC ]     STREAM     LISTENING     5406   2464/master         private/local
unix  2      [ ACC ]     STREAM     LISTENING     5410   2464/master         private/virtual
unix  2      [ ACC ]     STREAM     LISTENING     5414   2464/master         private/lmtp
unix  2      [ ACC ]     STREAM     LISTENING     5418   2464/master         private/anvil
unix  2      [ ACC ]     STREAM     LISTENING     5422   2464/master         private/scache
unix  2      [ ACC ]     STREAM     LISTENING     5426   2464/master         private/maildrop
unix  2      [ ACC ]     STREAM     LISTENING     5430   2464/master         private/old-cyrus
unix  2      [ ACC ]     STREAM     LISTENING     5434   2464/master         private/cyrus
unix  2      [ ACC ]     STREAM     LISTENING     5438   2464/master         private/uucp
unix  2      [ ACC ]     STREAM     LISTENING     5442   2464/master         private/ifmail
unix  2      [ ACC ]     STREAM     LISTENING     5446   2464/master         private/bsmtp
unix  2      [ ACC ]     STREAM     LISTENING     5119   2405/socket --delay /var/spool/postfix/postgrey/socket
unix  2      [ ACC ]     STREAM     LISTENING     5572   2509/xfs            /tmp/.font-unix/fs7100


Top
   
 Post subject:
PostPosted: Mon Aug 03, 2009 7:57 am 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
Your ISP is blocking access to port 25, this is actually quite common. You can either configure Postfix to listen to an additional port (usually 587), or use one of the various tunelling methods.


Top
   
 Post subject:
PostPosted: Mon Aug 03, 2009 8:53 am 
Offline
Senior Member

Joined: Mon May 14, 2007 8:20 am
Posts: 81
(1) would that mean that if I were to connect to the Internet from another ISP who allows port 25 (maybe in a totally different country), I would actually be able to connect to that port 25?

(2) I think I am going to open another port like 587

I added
587 inet n - n - - smtpd
to my master.cf file
[Is that enough?]

and it works!!!!

Thank you very much to all


Top
   
 Post subject:
PostPosted: Mon Aug 03, 2009 9:01 am 
Offline
Senior Member
User avatar

Joined: Mon Dec 10, 2007 4:30 pm
Posts: 341
Website: http://markwalling.org
That commented chunk of code in master.cf talking about "submission" exists for a reason...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group