Cant receive emails from domain

15 posts / 0 new
Last post
#1 Sat, 12/28/2013 - 09:14
wormsunited

Cant receive emails from domain

Hi there,

I am sorry, i made a fresh installation on my vps today and it seems i cannot receive any email from a domain i have created inside, i have search the forum for options how to fix this but i could not find any.

This is my problem:

I have created a account eg: dev@mydomain.com and i have installed roundcube on the same domain name with the location ./email and when i login all is ok, i can send emails but i cannot receive them, i have contacted my hosting provider and they said i got to fix this myself otherwise i need to pay 25 euros per 15 minutes... OMG, i gotta see this myself then....

So, now i have checked my dns settings and i guess all is working fine, i mean, my domain is correct and the server now is working with my domain name,, but i still have this problem, cant receive any emails on my mailbox, anyone can help me? thank you!

Sat, 12/28/2013 - 10:50
Locutus

First step for any problems of this kind: Review the logs at the time of delivery attempt. Syslog in /var/log/messages or /var/log/syslog depending on your distro. Also the mail log at /var/log/mail.log (or a variant depending on distro).

Please enclose any log excerpts you post in [code][/code] tags to preserve line breaks and monospace font. Also tell us please what exactly happens when you try to send a mail, i.e. what does "cannot receive them" mean exactly.

Fri, 01/24/2014 - 07:37 (Reply to #2)
wormsunited

Howdy i am sorry for the late reply i had to travel to another country and i had no contact with internet or my vps since then (Madagascar).

About this issue, this is what i get from the vps himself:

It seems i can send email, but i cannot send them from my account, this is what i get from my google account when i try to send email back to my vps email domain account wich is the main account and the only i have there at the moment

Technical details of temporary failure: The recipient server did not accept our requests to connect. Learn more at http://support.google.com/mail/bin/answer.py?answer=7720 [(10) mail.dsgdrops.com. [80.241.212.154]:25: Connection refused] [(20) mail.dsgdrops.com. [80.241.212.154]:25: Connection refused]

Does this help? i am a newbie on this control panel using it for the first time ever...

Fri, 01/24/2014 - 08:31
Locutus

The error message from Google says that their mailserver could not connect to yours. You might want to check if Postfix is running on your system using netstat -tln | grep :25 that should give you a result line.

Also make sure that your local firewall iptables -L -n is not blocking port 25, that no external firewall does so, or, if you're using NAT, that port 25 etc. are forwarded properly.

Fri, 01/24/2014 - 08:34 (Reply to #4)
wormsunited

thank you for your reply, i run a check on system configuration and i have this message on Postfix...

'' Your Postfix version does not support per-domain outgoing IP addresses ''

Fri, 01/24/2014 - 08:36 (Reply to #5)
wormsunited

sorry, however the system is ready to use virtualmin....

Fri, 01/24/2014 - 08:45
andreychek

Howdy,

Yeah, your "Re-Check Config" looks okay, but you may want to check the things Locutus mentioned to make sure that Postfix is accessible from the Internet.

What is the output of the following commands:

ps auxw | grep postfix
netstat -an | grep :25
iptables -L -n

Those commands will help troubleshoot the problem that you're having.

-Eric

Fri, 01/24/2014 - 08:50
wormsunited

ok, my only question is how do i do that? using putty and type those commands? i am a sick stupid newbie...

Fri, 01/24/2014 - 09:16
andreychek

Howdy,

Yup! You can use Putty to log in over SSH and type those commands.

Alternatively, you can also go into Webmin -> Others -> Command Shell, and type the commands there.

-Eric

Fri, 01/24/2014 - 09:32 (Reply to #9)
wormsunited

Hi there, this is what i got by typing the cmds....

> ps auxw | grep postfix root 3363 0.0 0.0 11336 1200 ? S 15:13 0:00 sh -c su root -c ps\ auxw\ \|\ grep\ postfix 2>&1 2>/dev/null root 3364 0.0 0.0 66884 1856 ? S 15:13 0:00 su root -c ps auxw | grep postfix root 3365 0.0 0.0 9232 1076 ? S 15:13 0:00 bash -c ps auxw | grep postfix root 3367 0.0 0.0 9232 408 ? D 15:13 0:00 bash -c ps auxw | grep postfix root 4762 0.0 0.1 81272 3428 ? Ss 2013 0:05 /usr/libexec/postfix/master postgrey 22941 0.0 0.6 157936 13344 ? Ss Jan21 0:00 /usr/sbin/postgrey -d --unix=/var/spool/postfix/postgrey/socket postfix 23046 0.0 0.1 81536 3476 ? S Jan21 0:00 qmgr -l -t fifo -u postfix 32111 0.0 0.1 81360 3324 ? S 13:35 0:00 pickup -l -t fifo -u > netstat -an | grep :25 tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN > iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpts:21000:21010 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:20 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:21 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp dpt:53 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:20000 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:10000 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:993 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:143 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:995 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:110 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:20 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:21 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:587 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:25 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22   Chain FORWARD (policy ACCEPT) target prot opt source destination   Chain OUTPUT (policy ACCEPT) target prot opt source destination
Fri, 01/24/2014 - 10:11
Locutus

Okay, your Postfix is configured to listen only on the loopback interface. That's why no connections from the outside are possible. The local IP should be "0.0.0.0:25".

Please post the output you get for these commands:

postconf -n cat /etc/postfix/master.cf

Did you use the Virtualmin installer script to install it? What Linux distro are you using? If you use the installer script on a Grade A supported system, it will definitely configure Postfix to listen on all interfaces.

Sat, 01/25/2014 - 11:26 (Reply to #11)
wormsunited

Hi there, i used the script installer with putty and my linux is: CentOS Linux 6.5 i belive its a Grade A supported system.

Here is the output:

> postconf -n alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases allow_percent_hack = no broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_protocols = all mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailbox_size_limit = 0 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, vmi9003.contabo.net, dsgdrops.com newaliases_path = /usr/bin/newaliases.postfix readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES sample_directory = /usr/share/doc/postfix-2.6.6/samples sender_bcc_maps = hash:/etc/postfix/bcc sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service unix:/var/spool/postfix/postgrey/socket smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual > cat /etc/postfix/master.cf # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master"). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes #submission inet n - n - - smtpd # -o smtpd_tls_security_level=encrypt # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #smtps inet n - n - - smtpd # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject # -o milter_macro_daemon_name=ORIGINATING #628 inet n - n - - qmqpd pickup fifo n - n 60 1 pickup cleanup unix n - n - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - n 300 1 oqmgr tlsmgr unix - - n 1000? 1 tlsmgr rewrite unix - - n - - trivial-rewrite bounce unix - - n - 0 bounce defer unix - - n - 0 bounce trace unix - - n - 0 bounce verify unix - - n - 1 verify flush unix n - n 1000? 0 flush proxymap unix - - n - - proxymap proxywrite unix - - n - 1 proxymap smtp unix - - n - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - n - - smtp -o smtp_fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - n - - showq error unix - - n - - error retry unix - - n - - error discard unix - - n - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - n - - lmtp anvil unix - - n - 1 anvil scache unix - - n - 1 scache # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # Many of the following services use the Postfix pipe(8) delivery # agent. See the pipe(8) man page for information about ${recipient} # and other message envelope options. # ==================================================================== # # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # #maildrop unix - n n - - pipe # flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient} # # ==================================================================== # # The Cyrus deliver program has changed incompatibly, multiple times. # #old-cyrus unix - n n - - pipe # flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user} # # ==================================================================== # # Cyrus 2.1.5 (Amos Gouaux) # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - n n - - pipe # user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user} # # ==================================================================== # # See the Postfix UUCP_README file for configuration details. # #uucp unix - n n - - pipe # flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # ==================================================================== # # Other external delivery methods. # #ifmail unix - n n - - pipe # flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient) # #bsmtp unix - n n - - pipe # flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient # #scalemail-backend unix - n n - 2 pipe # flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store # ${nexthop} ${user} ${extension} # #mailman unix - n n - - pipe # flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py # ${nexthop} ${user} submission inet n - n - - smtpd -o smtpd_sasl_auth_enable=yes
Sat, 01/25/2014 - 11:46
Locutus

Okay, you need to add the following line to your /etc/postfix/main.cf:

inet_interfaces = all

Then restart Postfix.

Are you sure you used the installer script? You have lots of directives in your Postfix configuration that should not be there in a default Virtualmin installation, yet others that should be there are missing.

Did you maybe install Postfix before you used the installer script? That script is meant to be run on a clean system with nothing (in terms of hosting software) but SSH on it.

Sat, 01/25/2014 - 13:36 (Reply to #13)
wormsunited

i am able to reinstall my os anytime and also make a fresh installation of virtualmin, what do you suggest me to do? I used the script to install and then i have been just making some updates as requested, also i think the postfix was installed with the script but i am not sure, should i make a new installation in my vps?

i added the line as requested and the email account its now working properly, but should i make a fresh installation?

Wed, 02/05/2014 - 08:05
wormsunited

Hi there, this issue is fixed and solved, i have some other questions that i will place in a new topic but this issue its now Solved and i must say thank you to Locutus and Andreycheck (yo guys are great)!

Topic locked