0

My first question here, if I don't provide sufficient info straight away, please take it easy on me with the downvotes ;-)

I'm running a VPS hosted by afterburst.com with OpenVZ

I installed and configured successfully the following components:

zpanel (with apache, mysql, php5.3, postfix)
updated successfully to php5.4
running Laravel on secundary webpage (works fine)

Sending emails out with php as well as with MUAs works fine. Emails send from MUA to locally hosted domain also works fine.

But here is the error:

When I'm sending an email with php sendmail command to a locally hosted domain, the email address is translated to [email protected]. I believe it has something to do with my DNS setup, but I tried many things and I just don't find the right answer

my hostname is

[user@vps ~]# hostname
vps.krause-it-consulting.com

here is my postfix config (postconf -n):

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
delay_warning_time = 4
disable_vrfy_command = yes
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = vps.$mydomain
mydomain = krause-it-consulting.com
myhostname = vps.krause-it-consulting.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 VPS_IP
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES
recipient_delimiter = +
relay_domains = proxy:mysql:/etc/zpanel/configs/postfix/mysql-relay_domains_maps                                                                                                                                                      .cf
sample_directory = /usr/share/doc/postfix-2.2.2/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_host_lookup = dns, native
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,        permit_mynetwor                                                                                                                                                      ks,        reject_unauth_destination,        reject_non_fqdn_recipient,        r                                                                                                                                                      eject_unknown_recipient_domain
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions =
smtpd_use_tls = no
soft_bounce = yes
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_alias                                                                                                                                                      _maps.cf,                     regexp:/etc/zpanel/configs/postfix/virtual_regexp
virtual_gid_maps = static:12
virtual_mailbox_base = /var/zpanel/vmail
virtual_mailbox_domains = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_                                                                                                                                                      domains_maps.cf
virtual_mailbox_maps = proxy:mysql:/etc/zpanel/configs/postfix/mysql-virtual_mai                                                                                                                                                      lbox_maps.cf
virtual_minimum_uid = 101
virtual_transport = dovecot
virtual_uid_maps = static:101

If you need further info, please ask and I will add.

I'd like to emphasize at the end, that only emails sent through php and sendmail command are the problem here. Everything else works fine (so far :-))

0

1 Answer 1

1

Considering, that I was working on this issue for the past 2 weeks, after writing down the details of the problem in this question, I was finally able to fix it.

It was actually an entry I made in the hosts file that caused this issue. Perhaps I was playing around a bit too much :-)

Anyway, here is the issue line:

127.0.0.1 localhost.localdomain localhost vps.krause-it-consulting.com krause-it-consulting.com hobbyathletes.com

after removing the 2 additions of my hosted domains it worked: Correct line:

 127.0.0.1 localhost.localdomain localhost vps.krause-it-consulting.com 

Anyway, I hope this will help someone.

Not the answer you're looking for? Browse other questions tagged .