Sentora Support Forums

Full Version: Postfix email problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm hoping someone might be able to help me. I've been trying to figure out this issue for the past two days with no luck. I just got a vds and transferred everything over from our old host. Everything is working wonderful except for email. I'm new to sentora so I'm also new to postfix email & roundcube. Originally my problem was I could receive email from my standard gmail but I cannot send any emails out. After following numerous threads from other people it seems I've only made my issue worse and confused myself. Now I cant even receive or send emails and roundcube keeps giving me this error.

p.s: my host doesn't block port 25

SMTP Error (450): Failed to add recipient "myemail@gmail.com" (4.1.1 <myemail@gmail.com>: Recipient address rejected: User unknown in local recipient table).


my main.cf config:

# postfix config file



# uncomment for debugging if needed

soft_bounce=yes



# postfix main

mail_owner = postfix

setgid_group = postdrop

delay_warning_time = 4



# postfix paths

html_directory = no

command_directory = /usr/sbin

daemon_directory = /var/lib/postfix

queue_directory = /var/spool/postfix

sendmail_path = /usr/sbin/sendmail.postfix

newaliases_path = /usr/bin/newaliases.postfix

mailq_path = /usr/bin/mailq.postfix

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.2.2/samples

readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES



# network settings

inet_interfaces = all

mydomain = admin.xeneum.com

myhostname = admin.xeneum.com

mynetworks = 127.0.0.1, 162.248.89.94

mydestination = localhost.$mydomain, localhost

relay_domains = proxy:mysql:/etc/sentora/configs/postfix/mysql-relay_domains_maps.cf



# mail delivery

recipient_delimiter = +



# mappings

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

#transport_maps = hash:/etc/postfix/transport

#local_recipient_maps =



# virtual setup

virtual_alias_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_alias_maps.cf,

                     regexp:/etc/sentora/configs/postfix/virtual_regexp

virtual_mailbox_base = /var/sentora/vmail

virtual_mailbox_domains = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_domains_maps.cf

virtual_mailbox_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_mailbox_maps.cf

virtual_mailbox_limit_maps = proxy:mysql:/etc/sentora/configs/postfix/mysql-virtual_mailbox_limit_maps.cf

virtual_minimum_uid = 998

virtual_uid_maps = static:998

virtual_gid_maps = static:998

virtual_transport = dovecot

dovecot_destination_recipient_limit = 1



# debugging

debug_peer_level = 2

debugger_command =

         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         xxgdb $daemon_directory/$process_name $process_id & sleep 5

# authentication

smtpd_sasl_auth_enable = yes

smtpd_sasl_security_options = noanonymous

smtpd_sasl_local_domain = admin.xeneum.com

broken_sasl_auth_clients = yes

smtpd_sasl_type = dovecot

smtpd_sasl_path = private/auth



# tls config

smtp_use_tls = no

smtpd_use_tls = no

#smtp_tls_note_starttls_offer = yes

#smtpd_tls_loglevel = 1

#smtpd_tls_received_header = yes

#smtpd_tls_session_cache_timeout = 3600s

#tls_random_source = dev:/dev/urandom

#smtp_tls_session_cache_database = btree:$data_directory/smtp_tls_session_cache

# Change mail.example.com.* to your host name

#smtpd_tls_key_file = /etc/pki/tls/private/mail.example.com.key

#smtpd_tls_cert_file = /etc/pki/tls/certs/mail.example.com.crt

# smtpd_tls_CAfile = /etc/pki/tls/root.crt



# rules restrictions

smtpd_client_restrictions =

smtpd_helo_restrictions =

smtpd_sender_restrictions =

smtpd_recipient_restrictions = permit_sasl_authenticated,

        permit_mynetworks,

        reject_unauth_destination,

        reject_non_fqdn_sender,

        reject_non_fqdn_recipient,

        reject_unknown_recipient_domain

# uncomment for realtime black list checks. (Warn: will also reject false positive)

#       ,reject_rbl_client zen.spamhaus.org

#       ,reject_rbl_client bl.spamcop.net

#       ,reject_rbl_client dnsbl.sorbs.net



smtpd_helo_required = yes

unknown_local_recipient_reject_code = 550

disable_vrfy_command = yes

smtpd_data_restrictions = reject_unauth_pipelining

smtpd_banner = $myhostname ESMTP


message_size_limit = 20480000

Not sure myself as I currently use Sentora on Windows, but I did do a quick Google and found a few ideas: [google]SMTP Error (450): Failed to add recipient (4.1.1 <>: Recipient address rejected: User unknown in local recipient table).[/google]
You didn't read I presume as I've state I've tried following several threads none of which were helpful just like your post.
(09-10-2015, 06:42 AM)xeneum Wrote: [ -> ]You didn't read I presume as I've state I've tried following several threads none of which were helpful just like your post.

I did read, and you never specified if you searched these forums or preformed other searches, all you said was 'After following numerous threads from other people' which is very vague.

After again reviewing your config, I'm not sure the mydomain and myhostname are correctly set. (Although, I use hMailserver on Windows, so I am not 100% familiar with postfix settings.) I am away from home so I can't check my Ubuntu test VM Sad

Example:
Code:
mydomain = admin.xeneum.com myhostname = admin.xeneum.com

I would think should be:
Code:
mydomain = xeneum.com myhostname = mail.xeneum.com or server name ??

Maybe @[Me.B] can shed some more light on this for you.
Thank-you for the help. I adjusted the configuration to reflect your suggestion. My mx record is set as mail.xeneum.com.

I also did a service postfix reload & service postfix restart and I'm still receiving the same error in roundcube. 

Changed settings:

mydomain = xeneum.com

myhostname = mail.xeneum.com
I figured out the problem with postfix and everything is working correctly now.  Sleepy
great! what did you fix? it might help out others.