I CAN NOT RECEIVE eMAILS

12 posts / 0 new
Last post
#1 Wed, 08/16/2017 - 06:08
jmujicab

I CAN NOT RECEIVE eMAILS

Hello, I need help, I have my server with multiple domains configured, I can send mails perfectly from all my domains but I can not receive emails since they are bounced, I leave the postfix configuration file below:

See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first
# Line of that file to be used as the name. The Debian default
# Is / etc / mailname.
#myorigin = / etc / mailname

Smtpd_banner = $ myhostname ESMTP $ mail_name
Biff = no

# Appending .domain is the MUA's job.
Append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

Readme_directory = no

# TLS parameters
Smtpd_tls_cert_file = / etc / ssl / certs / ssl-cert-snakeoil.pem
Smtpd_tls_key_file = / etc / ssl / private / ssl-cert-snakeoil.key
Smtpd_use_tls = yes
Smtpd_tls_session_cache_database = btree: $ {data_directory} / smtpd_scache
Smtp_tls_session_cache_database = btree: $ {data_directory} / smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# Information on enabling SSL in the SMTP client.

Smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
Myhostname = ns1.bpserver.ml
Alias_maps = hash: / etc / aliases
Alias_database = hash: / etc / aliases
Myorigin = / etc / mailname
Mydestination = ns1.bpserver.ml, localhost.bpserver.ml,, localhost
Mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [:: 1] / 128
Mailbox_command = / usr / bin / procmail-wrapper -o -a $ DOMAIN -d $ LOGNAME
Mailbox_size_limit = 0
Recipient_delimiter = +
Inet_protocols = all
Virtual_alias_maps = hash: / etc / postfix / virtual
Sender_bcc_maps = hash: / etc / postfix / bcc
Home_mailbox = Maildir /
Smtpd_sasl_auth_enable = yes
Smtpd_sasl_security_options = noanonymous
Broken_sasl_auth_clients = yes
Smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet: 127.0.0.1: 10023
Allow_percent_hack = no
Sender_canonical_maps = hash: / etc / postfix / canonical
Sender_dependent_default_transport_maps = hash: / etc / postfix / dependent
Milter_default_action = accept
Milter_protocol = 2
Smtpd_milters = inet: localhost: 8891
Non_smtpd_milters = inet: localhost: 8891
Smtpd_recipient_limit = 100
Mail_name = BP Mail Service
Sample_directory = / usr / share / doc / postfix / examples
Sendmail_path = / usr / sbin / sendmail
Html_directory = no
Setgid_group = postdrop
Command_directory = / usr / sbin
Manpage_directory = / usr / share / man
Daemon_directory = / usr / lib / postfix
Newaliases_path = / usr / bin / newaliases
Mailq_path = / usr / bin / mailq
Data_directory = / var / lib / postfix
Wed, 08/16/2017 - 07:37
m1ngaa
m1ngaa's picture

Just set up a new server with Virtualmin on CentOS 7, and ran into lots of problems... I think it's related to this new install script, perhaps version 6 of VM.

SASL auth keeps failing, can't send or receive emails at all. I spent 2 days trying to configure, and kinda gave up.

Thu, 08/17/2017 - 00:43
durgesh1610

Same issue on my part also,Since 2 days no work its smtp doesnot work at all,New update is just killing us.

Fri, 08/18/2017 - 05:23 (Reply to #3)
Joe
Joe's picture

Is yours a fresh install of Virtualmin 6, or is it an existing installation that was updated to the Virtualmin 6 module (but nothing else changed). As far as I know, nothing would have changed in the mail configuration if you updated an existing installation. We'll get it fixed, whatever it is, but right now I have no idea where the problem is; I'm hearing multiple descriptions of things that sound like completely unrelated problems (and may be completely unrelated problems). ;-)

--

Check out the forum guidelines!

Sat, 08/19/2017 - 11:24 (Reply to #4)
Joe
Joe's picture

Just to update on the "update is causing it" theory: it's not the update. ;-)

OP has a misconfiguration of myorigin in Postfix, probably caused by not having a fully qualified domain name set when /etc/mailname was set (it gets set to the system hostname when mail servers are installed, AFAIK). It's a debian/ubuntu quirk that I've never been very fond of.

--

Check out the forum guidelines!

Fri, 08/18/2017 - 05:20
Joe
Joe's picture

What appears in the maillog or mail.log when you try to send mail to the server?

And, what specifically is the bounce message received by the sender?

--

Check out the forum guidelines!

Sat, 08/19/2017 - 02:01 (Reply to #6)
jmujicab

bounce message:

This is the mail system at host
ns1.bpserver.ml.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<info-invcosmo.com@server> (expanded from <
info@invcosmo.com>):
Host or domain
    name not found. Name service error for name=server type=AAAA: Host not
    found

Final-Recipient: rfc822; info-invcosmo.com@server
Original-Recipient:
rfc822;info@invcosmo.com
Action: failed
Status: 5.4.4
Diagnostic-Code: X-BP-Mail-Service; Host or domain name not found. Name service
    error for name=server type=AAAA: Host not found

my log file:

Aug 19 13:39:54 ns1 postfix/smtpd[20815]: connect from mail-oi0-f52.google.com[209.85.218.52]
Aug 19 13:39:56 ns1 postgrey[1485]: action=pass, reason=client whitelist, client_name=mail-oi0-f52.google.com, client_address=209.85.218.52, sender=jmujicab@gmail.com, recipient=info@invcosmo.com
Aug 19 13:39:56 ns1 postgrey[1485]: cleaning up old logs...
Aug 19 13:39:56 ns1 postfix/smtpd[20815]: 28D1CA180B: client=mail-oi0-f52.google.com[209.85.218.52]
Aug 19 13:39:56 ns1 postfix/cleanup[20818]: 28D1CA180B: message-id=<19313B4CC1BB1258.72E2FE97-A499-4341-87A5-D35AAFA76F66@mail.outlook.com>
Aug 19 13:39:57 ns1 opendkim[1630]: 28D1CA180B: s=20161025 d=gmail.com SSL
Aug 19 13:39:57 ns1 postfix/qmgr[1747]: 28D1CA180B: from=<jmujicab@gmail.com>, size=4235, nrcpt=1 (queue active)
Aug 19 13:39:57 ns1 postfix/smtp[20820]: 28D1CA180B: to=<info-invcosmo.com@server>, orig_to=<info@invcosmo.com>, relay=none, delay=1.2, delays=1.1/0/0.07/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=server type=AAAA: Host not found)
Aug 19 13:39:57 ns1 postfix/cleanup[20818]: 53BB5A1922: message-id=<20170819013957.53BB5A1922@ns1.bpserver.ml>
Aug 19 13:39:57 ns1 postfix/qmgr[1747]: 53BB5A1922: from=<>, size=6406, nrcpt=1 (queue active)
Aug 19 13:39:57 ns1 postfix/bounce[20962]: 28D1CA180B: sender non-delivery notification: 53BB5A1922
Aug 19 13:39:57 ns1 postfix/qmgr[1747]: 28D1CA180B: removed
Aug 19 13:39:57 ns1 postfix/smtpd[20815]: disconnect from mail-oi0-f52.google.com[209.85.218.52]
Aug 19 13:39:57 ns1 postfix/smtp[20820]: connect to gmail-smtp-in.l.google.com[2404:6800:4003:c00::1a]:25: Network is unreachable
Aug 19 13:39:59 ns1 postfix/smtp[20820]: 53BB5A1922: to=<jmujicab@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.130.27]:25, delay=1.9, delays=0/0/0.94/0.91, dsn=2.0.0, status=sent (250 2.0.0 OK 1503106799 3si4720735pll.202 - gsmtp)
Aug 19 13:39:59 ns1 postfix/qmgr[1747]: 53BB5A1922: removed
Sat, 08/19/2017 - 11:21 (Reply to #7)
Joe
Joe's picture

Here's the problem: name not found. Name service error for name=server type=AAAA: Host not found

It can be caused by one of a few things:

  1. Your server hostname was not a fully qualified domain name that is resolvable during installation of postfix. ('server' is the name Postfix is trying to deliver to.)
  2. myorigin is incorrect. Check the contents of /etc/mailname, or just change myorigin to be something reasonable. It needs to be a name that the server can resolve.

So, check your hostname:

# hostname -f

Check to be sure that name can be resolved (using host hostname, where "hostname" is whatever the hostname command above returned as the name of your server).

And, make myorigin match that (or match something that resolves to your server IP address). I usually leave myorigin at the default, but Debian/Ubuntu likes to make things complicated (and prone to failures like this). The default is $myhostname and is sensible for most deployments that only have one mail server receiving mail.

--

Check out the forum guidelines!

Fri, 08/18/2017 - 15:36
antioch

ubuntu 16.04 here. i suspect the issue is with the recent clam update. ive got a mail.log full of "CLAMAV: couldn't connect to: /var/run/clamav/clamd.ctl: no such file or directory"

Fri, 08/18/2017 - 16:10
antioch

a simple reboot seems to have fixed the issue. ha! kinda forgot about that trick since i left windows behind.

Wed, 08/23/2017 - 07:33
jmujicab

Problem solved, it was the FQDN configuration that was lost when rebooting the system.

Wed, 08/23/2017 - 08:27 (Reply to #11)
Joe
Joe's picture

Yeah, if your system is not on a static IP and uses DHCP to configure the network, you have to take some extra steps to ensure hostname, name servers, etc. remains the same across boots, or you'll find you have a number of problems.

--

Check out the forum guidelines!

Topic locked