Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Some number of months ago I got postfix configured for email forwarding on a VPS with CentOS5. I'm switching to a dedicated Fedora server, but can't seem to get Postfix up and running. I've copied most of the configuration from the other server (the aliases and virtual files, and hashed those into .db files, as well as the settings from main.cf). If I do a ps -aux, the new server has all the same services running compared to the old one.

I've changed one of the domains (which I don't really use for anything) to use the new server in the MX entry of the zone file, but the test mail isn't coming through at all.

I have no idea where to start figuring out where the problem is. Mailservers evade me.

I know this all seems kind of vague. I didn't want to post every single config. parameter unnecessarily, so please let me know what is needed to solve this issue and I'll be happy to help.

EDIT: Initially, I did not have cyrus-imapd installed. That has been rectified (thanks to quanta), but now I am still not receiving mail routed through the server, and mail sent from the server is being sent twice.

By request: Postconf:

d_maps =
smtp_pix_workaround_threshold_time = 500s
smtp_pix_workarounds = disable_esmtp,delay_dotcrlf
smtp_quit_timeout = 300s
smtp_quote_rfc821_envelope = yes
smtp_randomize_addresses = yes
smtp_rcpt_timeout = 300s
smtp_reply_filter =
smtp_rset_timeout = 20s
smtp_sasl_auth_cache_name =
smtp_sasl_auth_cache_time = 90d
smtp_sasl_auth_enable = no
smtp_sasl_auth_soft_bounce = yes
smtp_sasl_mechanism_filter =
smtp_sasl_password_maps =
smtp_sasl_path =
smtp_sasl_security_options = noplaintext, noanonymous
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_sasl_tls_verified_security_options = $smtp_sasl_tls_security_options
smtp_sasl_type = cyrus
smtp_send_xforward_command = no
smtp_sender_dependent_authentication = no
smtp_skip_5xx_greeting = yes
smtp_skip_quit_response = yes
smtp_starttls_timeout = 300s
smtp_tls_CAfile =
smtp_tls_CApath =
smtp_tls_block_early_mail_reply = no
smtp_tls_cert_file =
smtp_tls_ciphers = export
smtp_tls_dcert_file =
smtp_tls_dkey_file = $smtp_tls_dcert_file
smtp_tls_eccert_file =
smtp_tls_eckey_file = $smtp_tls_eccert_file
smtp_tls_enforce_peername = yes
smtp_tls_exclude_ciphers =
smtp_tls_fingerprint_cert_match =
smtp_tls_fingerprint_digest = md5
smtp_tls_key_file = $smtp_tls_cert_file
smtp_tls_loglevel = 0
smtp_tls_mandatory_ciphers = medium
smtp_tls_mandatory_exclude_ciphers =
smtp_tls_mandatory_protocols = SSLv3, TLSv1
smtp_tls_note_starttls_offer = no
smtp_tls_per_site =
smtp_tls_policy_maps =
smtp_tls_protocols = !SSLv2
smtp_tls_scert_verifydepth = 9
smtp_tls_secure_cert_match = nexthop, dot-nexthop
smtp_tls_security_level =
smtp_tls_session_cache_database =
smtp_tls_session_cache_timeout = 3600s
smtp_tls_verify_cert_match = hostname
smtp_use_tls = no
smtp_xforward_timeout = 300s
smtpd_authorized_verp_clients = $authorized_verp_clients
smtpd_authorized_xclient_hosts =
smtpd_authorized_xforward_hosts =
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_client_connection_count_limit = 50
smtpd_client_connection_rate_limit = 0
smtpd_client_event_limit_exceptions = ${smtpd_client_connection_limit_exceptions:$mynetworks}
smtpd_client_message_rate_limit = 0
smtpd_client_new_tls_session_rate_limit = 0
smtpd_client_port_logging = no
smtpd_client_recipient_rate_limit = 0
smtpd_client_restrictions =
smtpd_command_filter =
smtpd_data_restrictions =
smtpd_delay_open_until_valid_rcpt = yes
smtpd_delay_reject = yes
smtpd_discard_ehlo_keyword_address_maps =
smtpd_discard_ehlo_keywords =
smtpd_end_of_data_restrictions =
smtpd_enforce_tls = no
smtpd_error_sleep_time = 1s
smtpd_etrn_restrictions =
smtpd_expansion_filter = \t\40!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
smtpd_forbidden_commands = CONNECT GET POST
smtpd_hard_error_limit = ${stress?1}${stress:20}
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_history_flush_threshold = 100
smtpd_junk_command_limit = ${stress?1}${stress:100}
smtpd_milters =
smtpd_noop_commands =
smtpd_null_access_lookup_key = <>
smtpd_peername_lookup = yes
smtpd_policy_service_max_idle = 300s
smtpd_policy_service_max_ttl = 1000s
smtpd_policy_service_timeout = 100s
smtpd_proxy_ehlo = $myhostname
smtpd_proxy_filter =
smtpd_proxy_options =
smtpd_proxy_timeout = 100s
smtpd_recipient_limit = 1000
smtpd_recipient_overshoot_limit = 1000
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = no
smtpd_restriction_classes =
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_exceptions_networks =
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_type = cyrus
smtpd_sender_login_maps =
smtpd_sender_restrictions =
smtpd_soft_error_limit = 10
smtpd_starttls_timeout = 300s
smtpd_timeout = ${stress?10}${stress:300}s
smtpd_tls_CAfile = ${config_directory}/ssl/cacert.pem
smtpd_tls_CApath =
smtpd_tls_always_issue_session_ids = yes
smtpd_tls_ask_ccert = no
smtpd_tls_auth_only = no
smtpd_tls_ccert_verifydepth = 9
smtpd_tls_cert_file = ${config_directory}/ssl/cert.csr
smtpd_tls_ciphers = export
smtpd_tls_dcert_file =
smtpd_tls_dh1024_param_file =
smtpd_tls_dh512_param_file =
smtpd_tls_dkey_file = $smtpd_tls_dcert_file
smtpd_tls_eccert_file =
smtpd_tls_eckey_file = $smtpd_tls_eccert_file
smtpd_tls_eecdh_grade = none
smtpd_tls_exclude_ciphers =
smtpd_tls_fingerprint_digest = md5
smtpd_tls_key_file = ${config_directory}/ssl/privkey.pem
smtpd_tls_loglevel = 3
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_exclude_ciphers =
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_protocols =
smtpd_tls_received_header = yes
smtpd_tls_req_ccert = no
smtpd_tls_security_level =
smtpd_tls_session_cache_database =
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_wrappermode = no
smtpd_use_tls = yes
soft_bounce = no
stale_lock_time = 500s
stress =
strict_7bit_headers = no
strict_8bitmime = no
strict_8bitmime_body = no
strict_mailbox_ownership = yes
strict_mime_encoding_domain = no
strict_rfc821_envelopes = no
sun_mailtool_compatibility = no
swap_bangpath = yes
syslog_facility = mail
syslog_name = ${multi_instance_name:postfix}${multi_instance_name?$multi_instance_name}
tcp_windowsize = 0
tls_append_default_CA = no
tls_daemon_random_bytes = 32
tls_eecdh_strong_curve = prime256v1
tls_eecdh_ultra_curve = secp384r1
tls_export_cipherlist = ALL:+RC4:@STRENGTH
tls_high_cipherlist = ALL:!EXPORT:!LOW:!MEDIUM:+RC4:@STRENGTH
tls_low_cipherlist = ALL:!EXPORT:+RC4:@STRENGTH
tls_medium_cipherlist = ALL:!EXPORT:!LOW:+RC4:@STRENGTH
tls_null_cipherlist = eNULL:!aNULL
tls_random_bytes = 32
tls_random_exchange_name = /var/run/prng_exch
tls_random_prng_update_period = 3600s
tls_random_reseed_period = 3600s
tls_random_source = dev:/dev/urandom
trace_service_name = trace
transport_maps =
transport_retry_time = 60s
trigger_timeout = 10s
undisclosed_recipients_header = To: undisclosed-recipients:;
unknown_address_reject_code = 450
unknown_address_tempfail_action = $reject_tempfail_action
unknown_client_reject_code = 450
unknown_helo_hostname_tempfail_action = $reject_tempfail_action
unknown_hostname_reject_code = 450
unknown_local_recipient_reject_code = 550
unknown_relay_recipient_reject_code = 550
unknown_virtual_alias_reject_code = 550
unknown_virtual_mailbox_reject_code = 550
unverified_recipient_defer_code = 450
unverified_recipient_reject_code = 450
unverified_recipient_reject_reason =
unverified_recipient_tempfail_action = $reject_tempfail_action
unverified_sender_defer_code = 450
unverified_sender_reject_code = 450
unverified_sender_reject_reason =
unverified_sender_tempfail_action = $reject_tempfail_action
verp_delimiter_filter = -=+
virtual_alias_domains = blanchardscoffee.com, turnleftllc.com, tscarberrymechanical.com, cheatatjoes.com, hyfiv.com, limnprint.com
virtual_alias_expansion_limit = 1000
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_recursion_limit = 1000
virtual_destination_concurrency_failed_cohort_limit = $default_destination_concurrency_failed_cohort_limit
virtual_destination_concurrency_limit = $default_destination_concurrency_limit
virtual_destination_concurrency_negative_feedback = $default_destination_concurrency_negative_feedback
virtual_destination_concurrency_positive_feedback = $default_destination_concurrency_positive_feedback
virtual_destination_rate_delay = $default_destination_rate_delay
virtual_destination_recipient_limit = $default_destination_recipient_limit
virtual_gid_maps =
virtual_initial_destination_concurrency = $initial_destination_concurrency
virtual_mailbox_base =
virtual_mailbox_domains = hash:${config_directory}/virtual_domains
virtual_mailbox_limit = 51200000
virtual_mailbox_lock = fcntl, dotlock
virtual_mailbox_maps = ${virtual_alias_maps}
virtual_minimum_uid = 100
virtual_transport = lmtp:unix:/var/lib/imap/socket/lmtp
virtual_uid_maps =

Mailllog snippet showing route of mail being sent via php:

Oct 17 15:50:27 ip-72-167-39-231 postfix/pickup[1486]: 1F1BB1084039: uid=0 from=<root>
Oct 17 15:50:27 ip-72-167-39-231 postfix/cleanup[2547]: 1F1BB1084039: message-id=<20111017225027.1F1BB1084039@ip-72-167-39-231.ip.secureserver.net>
Oct 17 15:50:27 ip-72-167-39-231 postfix/qmgr[1487]: 1F1BB1084039: from=<root@turnleftllc.com.ip.secureserver.net>, size=419, nrcpt=1 (queue active)
Oct 17 15:50:27 ip-72-167-39-231 postfix/smtp[2550]: 1F1BB1084039: to=<tom.thorogood@clearpointccs.org>, relay=s2smtpout.secureserver.net[208.109.80.210]:25, delay=0.17, delays=0.03/0/0.06/0.07, dsn=2.0.0, status=sent (250 Accepted message qp 24188 bytes 598)
Oct 17 15:50:27 ip-72-167-39-231 postfix/qmgr[1487]: 1F1BB1084039: removed
share|improve this question
    
Start by looking into mail server logs. –  AlexD Oct 18 '11 at 16:23
    
Thanks. Looks like it's looking for some .db files that were never created (as they are unnecessary). I'll experiment with either commenting out the main.cf lines that need them or just copying the blank .db files from the old server. –  Tom Thorogood Oct 18 '11 at 16:40
    
Got a legit error message now (see above). Not sure how to open the socket in question, or what service is supposed to start it. –  Tom Thorogood Oct 18 '11 at 16:44
add comment

1 Answer 1

up vote 1 down vote accepted

If you want to use Cyrus-IMAP, just install cyrus-imapd package:

# yum -y install cyrus-imapd

# /etc/init.d/cyrus-imapd start
Importing cyrus-imapd databases:                           [  OK  ]
Starting cyrus-imapd:                                      [  OK  ]

it will create the /var/lib/imap/socket/ folder with correct permissions:

srwxrwxrwx 1 cyrus mail 0 Oct 19 00:21 idle
-rw------- 1 cyrus mail 0 Oct 19 00:21 imap-0.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 imap-1.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 imaps-0.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 imaps-1.lock
srwxrwxrwx 1 root  root 0 Oct 19 00:21 lmtp
-rw------- 1 cyrus mail 0 Oct 19 00:21 lmtpunix-0.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 pop3-0.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 pop3-1.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 pop3s-0.lock
-rw------- 1 cyrus mail 0 Oct 19 00:21 pop3s-1.lock

If you don't want, just comment out the following lines in /etc/postfix/main.cf:

#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus
#mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
share|improve this answer
    
Thanks. I did some error searches and installed cyrus. the error messages are no longer in the maillog, but i'm still not receiving mail. I'm going to send another test, as it's possible the first one finally bounced permanently. –  Tom Thorogood Oct 18 '11 at 17:38
    
Okay, sendmail.postfix now works (for php contact forms, etc.), so that's a start. I am, however, still not receiving mail that is supposed to be forwarded through this server (for example, mailing tom@hyfiv.com should be forwarding to my gmail account). It doesn't appear to ever enter the queue, according to the maillog. –  Tom Thorogood Oct 18 '11 at 17:49
    
Also, sending mail via php seems to be sending it twice? There's only one entry in the maillog, however. –  Tom Thorogood Oct 18 '11 at 17:52
    
Post the configuration file (postconf), and the maillog snippet. –  quanta Oct 18 '11 at 17:52
    
Done. Thanks for helping out. I try to understand postfix/cyrus, but I don't really have any background with mailservers. It's all done by trial and error. (Maybe I should try to find a book on this). –  Tom Thorogood Oct 18 '11 at 18:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.