HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix and Dovecot continuous problems (http://www.howtoforge.com/forums/showthread.php?t=57581)

keen 8th June 2012 22:22

Postfix and Dovecot continuous problems
 
Hello and thank you in advance for any help offered. I installed ISPConfig using the The Perfect Server Ubuntu 12.04 LTS tutorial and most components work and have been very happy. I also purchased the ISPConfig 3 Manual so I must be missing something.

I cannot send or receive E-mail using Postfix/Dovecot. I try sending mail via the terminal, but that also doesn't work.

The following are some errors on the Logfiles > Show Mail Log:

Code:

Jun 8 14:26:37 server1 postfix/smtp[9111]: 6321C22099C: to=, relay=none, delay=188213, delays=188213/0/0/0, dsn=4.4.3, status=deferred (Host or domain name not found. Name service error for name=mydomain.com type=MX: Host not found, try again)
Jun 8 14:26:37 server1 amavis[9697]: (!)DENIED ACCESS from IP 192.168.1.20, policy bank ''

Other errors include:

Code:

Jun 8 14:26:37 server1 postfix/smtp[8891]: 462CF220EC0: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=130851, delays=130851/0.13/0/0, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)
Jun 8 14:26:37 server1 postfix/smtp[9098]: 7047E220EC8: to=, relay=127.0.0.1[127.0.0.1]:10024, delay=18156, delays=18156/0.18/0/0, dsn=4.4.2, status=deferred (lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)
Jun 8 14:26:37 server1 postfix/error[9139]: 359152208F9: to=, relay=none, delay=237862, delays=237862/0.21/0/0.06, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)
Jun 8 14:26:37 server1 postfix/error[9148]: 79B5E2204FC: to=, relay=none, delay=1355, delays=1355/0.21/0/0.07, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while receiving the initial server greeting)

Once again, thank you for any and all help

falko 9th June 2012 10:48

Did you create an MX record for mydomain.com?

keen 9th June 2012 19:35

Quote:

Originally Posted by falko (Post 280467)
Did you create an MX record for mydomain.com?

The following is in my DNS Zone settings

Code:

A        localhost.mydomain.com.        127.0.0.1        0       
A        mail.        192.168.1.20        0       
A        mydomain.com.        1.2.3.4        0        // Public IP address
A        www.        192.168.1.20        0       
CNAME        ftp.mydomain.com.        mydomain.com.        0       
NS        mydomain.com.        NS1.NAMESERVER.COM.        0       
NS        mydomain.com.        NS2.NAMESERVER.COM.        0

I appreciate the reply. I'm new to this and appreciate the forum support!

falko 10th June 2012 12:40

First, you have no MX record. Please create one.

Second:

Code:

A        mail.        192.168.1.20        0       
A        www.        192.168.1.20        0

The dots are wrong - please remove them.

You can either use

Code:

A        mail        192.168.1.20        0       
A        www        192.168.1.20        0

or

Code:

A        mail.mydomain.com.        192.168.1.20        0       
A        www.mydomain.com.        192.168.1.20        0


keen 13th June 2012 19:51

Thank you for your attention, after setting up the MX record, now I get the following errors:

Code:

Jun 13 12:25:02 server1 postfix/smtpd[3077]: connect from localhost[127.0.0.1]
Jun 13 12:25:02 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jun 13 12:25:02 server1 postfix/smtpd[3077]: lost connection after CONNECT from localhost[127.0.0.1]
Jun 13 12:25:02 server1 postfix/smtpd[3077]: disconnect from localhost[127.0.0.1]
Jun 13 12:25:02 server1 dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Jun 13 12:30:02 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured


falko 14th June 2012 16:33

Does sending/receiving emails work now?

keen 14th June 2012 17:41

Quote:

Originally Posted by falko (Post 280651)
Does sending/receiving emails work now?

Falko, thank-you for the follow up. No, it does not work yet. I'm receiving a lot of time-out errors. Here's an example in my Show Mail Log:

Code:

Jun 14 09:16:04 server1 postfix/smtp[30692]: connect to mta7.am0.yahoodns.net[66.94.236.34]:25: Connection timed out
Jun 14 09:16:04 server1 postfix/smtp[30692]: D362B220079: to=, relay=none, delay=221696, delays=221546/0.04/150/0, dsn=4.4.1, status=deferred (connect to mta7.am0.yahoodns.net[66.94.236.34]:25: Connection timed out)
Jun 14 09:20:01 server1 dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured

I didn't mention this before but my setup is as the following:

Internet <-> Modem(1.2.3.4) <-> Router with NAT enabled(192.168.1.1) <-> Server1(192.168.1.20)

I also receive these errors:

Code:

Jun 14 10:23:35 server1 postfix/smtp[757]: warning: smtp_connect_addr: bind 1.2.3.4: Cannot assign requested address
Jun 14 10:23:35 server1 postfix/smtp[754]: warning: smtp_connect_addr: bind 1.2.3.4: Cannot assign requested address
Jun 14 10:23:35 server1 postfix/smtp[753]: warning: smtp_connect_addr: bind 1.2.3.4: Cannot assign requested address

I have the ports 25 and 110 open and forwarded to Server1.

Again, thank you for the follow up :)

falko 15th June 2012 12:52

Quote:

Jun 14 09:16:04 server1 postfix/smtp[30692]: D362B220079: to=, relay=none, delay=221696, delays=221546/0.04/150/0, dsn=4.4.1, status=deferred (connect to mta7.am0.yahoodns.net[66.94.236.34]:25: Connection timed out)
Is that a remote server or your own server?

Can you post your main.cf?

keen 19th June 2012 01:21

It's my own server

Code:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = /usr/share/doc/postfix
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.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
myhostname = server1.resacahost.com
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = $myhostname, mail.$mydomain, localhost.$mydomain, $mydomain
relayhost =
mynetworks = 76.205.152.158, 127.0.0.0/8 [::1]/128
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = mail/
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
message_size_limit = 0
html_directory = /usr/share/doc/postfix/html

Thank-you

falko 20th June 2012 00:10

What's the output of
Code:

netstat -tap
?


All times are GMT +2. The time now is 04:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.