Using Postfix to relay mail to Exchange Server

Hi All;

I did not think this was going to be as big a job as it is. I am trying to use my SuSE 12.3 machine to relay emails to my Exchange server.

  1. I can telnet from my machine to the exchange server on port 25 and send an email. THIS WORKS
  2. I then tried pine (Alpine) to send an mail but had to configure the smtp server. THIS ALSO WORKS
  3. Now when I try and use the webserver (Apache2, Php5) to send an email I get the following in the mailq
    —cut—
    60B3A74 435 Mon Sep 23 15:43:49 root@corona.jaycollc.com
    (address resolver failure)
    jay@jayco-llc.com
    —paste—

so I am kind of at a lost. I cannot find too much information on what causes this error.

my main.cf

biff = no
content_filter =
delay_warning_time = 1h
disable_dns_lookups = yes
disable_mime_output_conversion = no
inet_interfaces = localhost
inet_protocols = ipv4
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
mydestination = $myhostname, localhost.$mydomain, $mydomain
myhostname = corona.jaycollc.com
mynetworks_style = subnet
relayhost = [robusto.jaycollc.com]
alias_maps = hash:/etc/aliases
canonical_maps = hash:/etc/postfix/canonical
relocated_maps = hash:/etc/postfix/relocated
sender_canonical_maps = hash:/etc/postfix/sender_canonical
transport_maps = hash:/etc/postfix/transport
mail_spool_directory = /var/mail
message_strip_characters = \0
defer_transports =
mailbox_command =
mailbox_transport =
mailbox_size_limit = 0
message_size_limit = 0
strict_8bitmime = no
strict_rfc821_envelopes = no
smtpd_helo_required = no
smtpd_client_restrictions =
smtpd_helo_restrictions =
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
############################################################

SASL stuff

############################################################
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_auth_enable = no
############################################################

TLS stuff

############################################################
#tls_append_default_CA = no
relay_clientcerts =
#tls_random_source = dev:/dev/urandom
smtp_use_tls = yes
#smtp_tls_loglevel = 0
smtp_enforce_tls = yes
smtp_tls_CAfile =
smtp_tls_CApath = /etc/postfix/ssl/cacerts
smtp_tls_cert_file =
smtp_tls_key_file =
#smtp_tls_session_cache_timeout = 3600s
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_session_cache
smtpd_use_tls = no
#smtpd_tls_loglevel = 0
smtpd_tls_CAfile =
smtpd_tls_CApath =
smtpd_tls_cert_file =
smtpd_tls_key_file =
smtpd_tls_ask_ccert = no
smtpd_tls_received_header = no

I have not added or changed anything in the master.cf

any ideas?

Maybe to start with you could check MX records with

#nslookup
> set q=mx
> jayco-llc.com

Yes I could do this but jayco-llc.com is an account on godaddy and has been for many years. Again sending through thru pine is not an issue. so emails get to jayco-llc.com just not using postfix.

To update. I have tried it with several of my personal accounts Apple (me.com), Godaddy, Hotmail and all fail for address resolver issues.

On 2013-09-24 16:16, jaycova wrote:
>
> Yes I could do this but jayco-llc.com is an account on godaddy and has
> been for many years. Again sending through thru pine is not an issue. so
> emails get to jayco-llc.com just not using postfix.

Your description is not clear enough. I don’t know if emails are sent
directly to destination, from pine to exchange, from pine to postfix,
then from postfix to exchange…


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Carlos

My apologies.

I simply want my webserver to email out thru my corporate exchange server.
Pine sets its own smtp server. I have that using my corporate server directly. (smtp server = mail.mycompany.com)
my Website (Apache2) uses postfix as the Linux sending email server. I want postfix to simply send all mail out thru mail.mycompany.com NOT website.mycompany.com
mail.mycompany.com is my Exchange server. I have used Yast2 to try and set the outbound server which it is and use an Exchange mail account to authenticate.

I just want it to relay all emails going out. receive NONE. what am I missing?

Is this at all more clear?

If I need to uninstall postfix I am willing to do that and start over. the problem with that is that Yast2 does not remove everything so I need to know where all the files are. There are some outside of /etc/postfix.

Jay

On 2013-09-24 18:46, jaycova wrote:
>
> If I need to uninstall postfix I am willing to do that and start over.
> the problem with that is that Yast2 does not remove everything so I need
> to know where all the files are. There are some outside of /etc/postfix.

Uninstalling postfix will not remove the configuration files. All
configuration files are in /etc/postfix

If postfix complains of resolver issues, it will be true, so check it.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Carlos

Thanks. You know one of the problems is sometimes when you keep trying you cause more damage. I removed postfix and I deleted everything in /etc/postfix the /etc/sysconfig/postfix and everything from /var/adm/backup/postfix.

I reinstalled from scratch and not it works from the command line as well as from the web.

Thanks all

On 2013-09-24 20:06, jaycova wrote:
>
> Carlos
>
> Thanks. You know one of the problems is sometimes when you keep trying
> you cause more damage. I removed postfix and I deleted everything in
> /etc/postfix the /etc/sysconfig/postfix and everything from
> /var/adm/backup/postfix.
>
> I reinstalled from scratch and not it works from the command line as
> well as from the web.

Interesting :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)