1

I have got to setup a mail server(ubuntu cloud server) and I'm preparing for it on my home computer(ubuntu vm) to make sure my manager that it works and I could. I started with Postfix, Dovecot, and Squirrelmail following the tutorial and if it works here then I can start doing it on the cloud server. The home computer has dynamic public ip address(the ip changes only if I restart the router) and I have registered a trial domain for this public ip(A-lts.mooo.com, MX-maillts.mooo.com) which could be globally resolved.

I'm having problem in sending & receiving mails from and to the server. I could not send mails to gmail accounts but I was able to send mails to yahoo for 2,3 times and after that I could not(here the log shows below).

The below are my mail server configurations,


Postfix:

myhostname = lts.mooo.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mooo.com, lucid, localhost.localdomain, localhost
relayhost =
mynetworks = 192.168.1.4 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth-client
smtpd_sasl_local_domain = mooo.com
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
#inet_interfaces = all



smtpd_tls_auth_only = no
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom



home_mailbox = Maildir/
smtpd_sasl_authenticated_header = no
smtpd_sender_restrictions =
mailbox_command =
smtp_use_tls = no
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_mandatory_ciphers = medium

Dovecote: Just made changes as per the tutorial.


/var/log/mail.log:

May 14 21:49:11 lucid dovecot: imap-login: Login: user=<user1>, method=PLAIN, rip=183.82.61.111, lip=192.168.1.4
May 14 21:49:11 lucid dovecot: IMAP(user1): Disconnected: Logged out bytes=79/669
May 14 21:49:13 lucid dovecot: imap-login: Login: user=<user1>, method=PLAIN, rip=183.82.61.111, lip=192.168.1.4
May 14 21:49:13 lucid dovecot: IMAP(user1): Disconnected: Logged out bytes=79/669
May 14 21:51:52 lucid postfix/qmgr[5902]: 0D71442EF8: from=<user1@mooo.com>, size=3839, nrcpt=1 (queue active)
May 14 21:51:52 lucid postfix/smtp[6110]: 0D71442EF8: to=<myyahoo-id-here@yahoo.co.in>, relay=mx1.mail.in.yahoo.com[180.222.96.138]:25, delay=12946, delays=12946/0.12/0.06/0, dsn=4.7.1, status=deferred (host mx1.mail.in.yahoo.com[180.222.96.138] refused to talk to me: 553 5.7.1 [BL21] Connections will not be accepted from 183.82.61.111, because the ip is in Spamhaus's list; see http://postmaster.yahoo.com/550-bl23.html)
May 14 21:52:26 lucid postfix/anvil[5918]: statistics: max connection rate 1/60s for (smtp:183.82.61.111) at May 14 21:47:12
May 14 21:52:26 lucid postfix/anvil[5918]: statistics: max connection count 1 for (smtp:183.82.61.111) at May 14 21:47:12
May 14 21:52:26 lucid postfix/anvil[5918]: statistics: max cache size 1 at May 14 21:47:12

I haven't received any of the mails sent from external domains(yahoo, google to user1@mooo.com) yet(I know the dynamic public ips are not choosen but want to check if it works). I need some help here so that I can receive mails from any domain and send to any domain.

I hope some are running their own mail servers and could help me here finding out where I'm doing wrong, giving some clues and informations to reach my goal.

Thank you!


EDIT:1

Screenshot of domain records added, Free Domain name registered


EDIT:2

    May 15 17:14:49 lucid postfix/smtp[2858]: 1DC8942EAF: to=<my-id-here@yahoo.co.in>, relay=mx1.mail.in.yahoo.com[180.222.96.138]:25, delay=2.7, delays=0.15/0.28/0.12/2.2, dsn=2.0.0, status=sent (250 ok dirdel)
    May 15 17:14:50 lucid postfix/smtp[2857]: 1DC8942EAF: to=<my-id-here@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.155.27]:25, delay=3.3, delays=0.15/0.12/1.8/1.2, dsn=5.7.1, status=bounced (host gmail-smtp-in.l.google.com[74.125.155.27] said: 550-5.7.1 [183.82.62.102] The IP you're using to send mail is not authorized to 550-5.7.1 send email directly to our servers. Please use the SMTP relay at your 550-5.7.1 service provider instead. Learn more at                          550 5.7.1 http://mail.google.com/support/bin/answer.py?answer=10336 o5si12424488wfn.122 (in reply to end of DATA command))
    May 15 17:14:50 lucid postfix/cleanup[2855]: 8C22D42EF3: message-id=<20110515114450.8C22D42EF3@lts.mooo.com>
    May 15 17:14:50 lucid postfix/bounce[2863]: 1DC8942EAF: sender non-delivery notification: 8C22D42EF3
    May 15 17:14:50 lucid postfix/qmgr[2734]: 1DC8942EAF: removed
    May 15 17:14:50 lucid postfix/qmgr[2734]: 8C22D42EF3: from=<>, size=4155, nrcpt=1 (queue active)
May 15 17:14:51 lucid postfix/smtp[2858]: 8C22D42EF3: to=<user1@mooo.com>, relay=mail.afraid.org[67.19.72.201]:25, delay=1.2, delays=0.06/0.01/0.75/0.34, dsn=5.7.1, status=bounced (host mail.afraid.org[67.19.72.201] said: 554 5.7.1 Service unavailable; Client host [183.82.62.102] blocked using cbl.abuseat.org; Blocked - see http://cbl.abuseat.org/lookup.cgi?ip=183.82.62.102 (in reply to RCPT TO command))
May 15 17:14:52 lucid postfix/qmgr[2734]: 8C22D42EF3: removed
user53864
  • 1,653
  • 8
  • 36
  • 66

1 Answers1

2

The MX record for mooo.com says that your mail is handled by mail.afraid.org. When I attempt to send email to user1@mooo.com through mail.afraid.org, it says "User unknown in virtual address table".

As for why your outgoing mail is failing, look in your log:

Connections will not be accepted from 183.82.61.111, because the ip is in Spamhaus's list

You seem to be confused as to whether you're sending and receiving mail for mooo.com or for lts.mooo.com. If you want maillts.mooo.com to receive email sent to user1@mooo.com, then you need a MX record for mooo.com that specifies maillts.mooo.com, instead of mail.afraid.org. As it's set up now, it should receive email for user1@lts.mooo.com, but your Postfix configuration doesn't seem to specify that in the mydestination section.

Paul Tomblin
  • 5,217
  • 1
  • 27
  • 39
  • Actually the mail server I'm trying is a VM and I turned it off. I added a MX record like `maillts.mooo.com`, is it useless?. I VM is up now. I don't have any idea what to do.... – user53864 May 15 '11 at 01:18
  • You haven't set an MX record for its.mooo.com. The MX record for mooo.com is mail.afraid.org. – Paul Tomblin May 15 '11 at 01:22
  • I have pasted a screenshot, could you find any thing in that? – user53864 May 15 '11 at 01:26
  • I didn't see u updated your answer. U recognized well, that I'm confused, I'm stressing on your last edit and trying so that I can understand what I should do... – user53864 May 15 '11 at 01:51
  • Did you send a mail?, I got a mail at user1@mooo.com's inbox – user53864 May 15 '11 at 01:53
  • Yes, I sent it, but I had to telnet to maillts.mooo.com and send it to user1@mooo.com. Like I said above, you've got maillts.mooo.com as the MX for lts.mooo.com, not mooo.com, but it will only accept email for mooo.com not lts.mooo.com. – Paul Tomblin May 15 '11 at 02:13
  • I tried MX for `mooo.com` but it's saying `@.mooo.com` is already registered/taken – user53864 May 15 '11 at 02:27
  • wow!, you are right, as you said it should be `maillts.mooo.com` in the `mydestination`. Now I could receive mails from yahoo & google but I can only send to yahoo but not google mail. Any more help?. I have updated my answer. – user53864 May 15 '11 at 11:48
  • Sometimes I could send and sometimes not to yahoo and gmail. On further research I saw something like some websites will be hosted for preventing spam and Spamhaus(from my log) is also a spam control. Is it because of my dynamic public ip?. And Should I really need to change my SMTP(postfix) port from 25 to 587? – user53864 May 16 '11 at 05:59
  • I want to hear from you again, If I have static public ip, will it maintain the consistency of sending & receiving mails?. Thank you! – user53864 May 16 '11 at 06:01
  • 1
    Changing your port won't do anything. Those log files show which RBLs (Realtime Blackhole Lists) are blocking you - check with them to see why. – Paul Tomblin May 16 '11 at 10:37
  • I'm thinking, may be with the static public ip it won't be blocked by any spam preventers and I can think of doing it on cloud server... – user53864 May 17 '11 at 02:15
  • Dynamic IPs are definitely blocked by many RBLs. You might want to send a test email from your static ip just to make sure it isn't blocked as well. – Paul Tomblin May 17 '11 at 02:29
  • I'm wondering how?, many run their own mail server when RBLs even block the static ip. They might be doing something to avoid this. If you want to let me know what is that, please at your leisure time. Thanks a lot!!! – user53864 May 17 '11 at 04:24