0

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 anywho@anywhere.com and i can now send to anywho@anywhere.com the only problem i have is that when i send to anywho@anywhere.com it comes though as me@gmail.com

I would like it to come through as me@mydomain.com

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
Anthony Fornito
  • 425
  • 1
  • 7
  • 19

1 Answers1

1

You're using a relayhost.
It should go out as you@gmail.com because gmail swaps the sender to reflect your gmail account.

You can send email as you@domain.com 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.

gifnoc-gkp
  • 1,506
  • 1
  • 8
  • 17
  • Dynamic IP address. I would think there would have to be a way to do this. Why anyone who is trying to look professional would elect for someone to send an email to one address and then to reply form a totally different is worthless in my mind. – Anthony Fornito Jul 10 '13 at 00:07
  • It's spam prevention. Dynamic IPs are like 70%(approx.) of the global IPv4 addresses. If they could send emails to anyone then groups of them would be able to DDOS any SMTP server and shut it down. But the way your server WILL accept everything but will not be allowed to send anything directly unless it comes from a trusted/static ip. – gifnoc-gkp Jul 10 '13 at 00:17
  • @user2566483 If my answer helped you, click the big green button :P. – gifnoc-gkp Jul 10 '13 at 00:21