0
votes

Hoping someone can help me out with this.

Current Setup

Home Verzion router -- Dynamic IP address port 25 blocked

Windows server 2008 --> Hyper-V --> Centos6

Postfix

Dovecot

SquirrelMail

**Removed Sendmail

So i can receive an email from [email protected] and i can now send to [email protected] the only problem i have is that when i send to [email protected] it comes though as [email protected]

I would like it to come through as [email protected]

It looks like my sending domain has changed. Did i do something wrong

I could post my logs but they do not give any errors so im not sure how much that would help.

Anything else i can post let me know

[root@thenerdservice log]# grep -v \# /etc/postfix/main.cf |grep -v ^$
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mail.mydomain.com
mydomain = mydomain.com
myorigin = $myhostname
myorigin = $mydomain
inet_interfaces = all
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
unknown_local_recipient_reject_code = 550
mynetworks = 192.168.1.0/24, 127.0.0.0/8, 8.8.8.8
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/saslpasswd
smtp_always_send_ehlo = yes
relayhost = [smtp.gmail.com]:587
smtp_sasl_tls_security_options = noanonymous
smtp_use_tls = yes
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
smtp_sasl_tls_security_options = noanonymous
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/


debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
queue_directory = /var/spool/postfix
1

1 Answers

1
votes

You're using a relayhost.
It should go out as [email protected] because gmail swaps the sender to reflect your gmail account.

You can send email as [email protected] only if you have a STATIC ip. Dynamic IP addresses are blacklisted by most email providers.

If you have a static IP, just remove: relayhost, *smtp_sasl_password_maps* and generally sasl unless you know what you're doing.


To check wether you're blacklisted or not click here.