HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   The Perfect Server - Ubuntu 12.10 Question (http://www.howtoforge.com/forums/showthread.php?t=62196)

EllisP 12th June 2013 21:26

The Perfect Server - Ubuntu 12.10 Question
 
Hey everyone;

This is my first time posting on these forums, and I'd like to start of by thanking falko for writing that great how-to on Ubuntu 12.10.

I've been setting up my clients and email domains, and discovered a problem:

First off my POP3 Dovecot is working and I can connect to it with telnet, but my SMTP server isn't, if I try to connect to it using telnet it keeps trying to connect untill it times out.
I was wondering if anyone else had encountered this and could point me in the right direction, I currently can't send any emails (within my own domain).


Kind regards;
Ellis Pluym

Edit: Adding my postconf -n output

Quote:

alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
append_dot_mydomain = no
biff = no
body_checks = regexp:/etc/postfix/body_checks
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
dovecot_destination_recipient_limit = 1
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
mime_header_checks = regexp:/etc/postfix/mime_header_checks
mydestination = ubuntuserver.example.com, localhost, localhost.localdomain
myhostname = ubuntuserver.example.com
mynetworks = 127.0.0.0/8 [::1]/128
myorigin = /etc/mailname
nested_header_checks = regexp:/etc/postfix/nested_header_checks
owner_request_special = no
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
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_message_rate_limit = 100
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
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_gid_maps = static:5000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

monkfish 12th June 2013 22:03

Hello EllisP,

A few ideas to help you track down...

- Have a check see if postfix is actually running. Do something like "ps ax | grep master" - you should have a process listed there.

See if its listening on the address you're connecting to - "netstat -A inet -nlp" see if a process "master" for port 25 is listening on either any address (0.0.0.0) or a specified address.

- Check you're not firewalled out at all?

- On my ubuntu installation when I configured postfix it automatically specified start on boot. You might like to check thats the case on yours.

- Where are you telneting from? Is it your local PC, could it be antivirus or similar getting in the way?

- Maybe do a "service postfix restart" to check its starting correctly.

- Have a look in the mail log file for errors - something like "cat /var/log/mail.log".

- you said you followed a Perfect Server guide, suggesting you installed ISPConfig. What happens when you log in there and go to the monitor tab? Does it show any services offline?

HTH

EllisP 12th June 2013 22:30

Thanks for the tips monkfish, I'll look into them asap, but I'm currently not in the office, but I'll update here when I can.

EllisP 13th June 2013 18:54

Quote:

Originally Posted by monkfish (Post 298560)
Hello EllisP,
- Have a check see if postfix is actually running. Do something like "ps ax | grep master" - you should have a process listed there.

This is what I got

1264 ? Ss 0:00 /usr/sbin/amavisd-new (master)
1803 ? Ss 0:00 php-fpm: master process (/opt/php-5.3.18/etc/php-fpm.conf)
1816 ? Ss 0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
3021 ? Ss 0:00 /usr/lib/postfix/master
3102 pts/0 S+ 0:00 grep --color=auto master

/usr/lib/postfix/master process is listed
Quote:

Originally Posted by monkfish (Post 298560)
See if its listening on the address you're connecting to - "netstat -A inet -nlp" see if a process "master" for port 25 is listening on either any address (0.0.0.0) or a specified address.

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 3021/master

Quote:

Originally Posted by monkfish (Post 298560)
- Check you're not firewalled out at all?

My firewall is disabled on my Windows 7 which I'm using to connect to the server and unless Ubuntu comes with a firewall which I've not read anything about in the How To there shouldn't be any other walls in the way.
Quote:

Originally Posted by monkfish (Post 298560)
- On my ubuntu installation when I configured postfix it automatically specified start on boot. You might like to check thats the case on yours.

I ran the ps ax | grep master when I booted the server and the process was running so I'm guessing that's a yes.
Quote:

Originally Posted by monkfish (Post 298560)
- Where are you telneting from? Is it your local PC, could it be antivirus or similar getting in the way?

I'm telnetting from a windows 7 PC in the same network, I also don't have an AV on this PC
Quote:

Originally Posted by monkfish (Post 298560)
- Maybe do a "service postfix restart" to check its starting correctly.

No problems here

root@ubuntuserver:/home/administrator# service postfix restart
* Stopping Postfix Mail Transport Agent postfix [ OK ]
* Starting Postfix Mail Transport Agent postfix [ OK ]

Quote:

Originally Posted by monkfish (Post 298560)
- Have a look in the mail log file for errors - something like "cat /var/log/mail.log".

Well there's quite a few errors here, one seems to be pointing at an SSL error;
Code:

Jun 13 18:45:02 ubuntuserver postfix/smtps/smtpd[2593]: connect from localhost.localdomain[127.0.0.1]
Jun 13 18:45:02 ubuntuserver postfix/smtps/smtpd[2593]: SSL_accept error from localhost.localdomain[127.0.0.1]: lost connection
Jun 13 18:45:02 ubuntuserver postfix/smtps/smtpd[2593]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jun 13 18:45:02 ubuntuserver postfix/smtps/smtpd[2593]: disconnect from localhost.localdomain[127.0.0.1]
Jun 13 18:46:03 ubuntuserver postfix/smtps/smtpd[2556]: SSL_accept error from unknown[192.168.21.20]: lost connection
Jun 13 18:46:03 ubuntuserver postfix/smtps/smtpd[2556]: lost connection after CONNECT from unknown[192.168.21.20]
Jun 13 18:46:03 ubuntuserver postfix/smtps/smtpd[2556]: disconnect from unknown[192.168.21.20]
Jun 13 18:46:16 ubuntuserver postfix/smtps/smtpd[2565]: SSL_accept error from unknown[192.168.21.20]: lost connection
Jun 13 18:46:16 ubuntuserver postfix/smtps/smtpd[2565]: lost connection after CONNECT from unknown[192.168.21.20]
Jun 13 18:46:16 ubuntuserver postfix/smtps/smtpd[2565]: disconnect from unknown[192.168.21.20]
Jun 13 18:46:19 ubuntuserver postfix/smtps/smtpd[2593]: connect from unknown[192.168.21.20]


Quote:

Originally Posted by monkfish (Post 298560)
- you said you followed a Perfect Server guide, suggesting you installed ISPConfig. What happens when you log in there and go to the monitor tab? Does it show any services offline?

HTH

http://imgur.com/sLM7eyn

[img] not working so posting url

EDIT: I found a post of someone else with this issue and it turns out it wasn't too hard to solve,
http://www.howtoforge.com/forums/showthread.php?t=61657
I can now send emails within my own network!

EllisP 13th June 2013 21:02

Thank you monkfish for helping me track down the problem, I've stumbled upon another problem now though, when trying to send emails from my domain, to for example hotmail or gmail; I get an error when I try to send it
ERROR:
Message not sent. Server replied:
Requested action aborted: error in processing
451 4.3.0 <**********@gmail.com>: Temporary lookup failure

Any idea what might be the problem?


All times are GMT +2. The time now is 18:52.

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