Hello list,

 I am attempting to build a basic postfix setup that is able to send mail to 
the internet. Receiving email is not a priority. 

 I've verified that this basic setup DOES work on an Amazon EC2 instance and 
can be used to send email to anyplace it would like. However when I transfer 
the config (main.cf and master.cf) to our work network the messages are 
deferred and rejected by any mail server it encounters. I'd like very much to 
understand why this is happening and to get this config to work on our local 
network.

  If I perform a telnet mail test on my local network the message is rejected 
and deferred no matter what mail server it tries to communicate with:

  [monitor03:root:/etc/postfix]#telnet localhost 25
   Trying 127.0.0.1...
   Connected to localhost.
   Escape character is '^]'.
   220 monitor03.localdomain ESMTP Postfix
   HELO monitor03
   250 monitor03.localdomain
   MAIL FROM: <mail-sen...@sending-domain.com>
   250 2.1.0 Ok
   RCPT TO: <mail-recei...@receiving-domain.com>
   250 2.1.5 Ok
   DATA
   354 End data with <CR><LF>.<CR><LF>
   Subject: test message
   test test test
   .
   250 2.0.0 Ok: queued as E45C2136357
   quit
   221 2.0.0 Bye
   Connection closed by foreign host.

   This is what happens in the mail log when this test is performed:

   Nov 17 16:25:39 monitor03 postfix/smtp[26004]: E45C2136357: 
to=<mail-recei...@receiving-domain.com>, relay=none, delay=4755,      
delays=4755/0.02/0.05/0, dsn=4.4.1, status=deferred (connect to 
alt4.gmail-smtp-in.l.google.com[74.125.43.27]:25:  Connection refused)

   If I perform a telnet test from the cloud instance the message is sent and 
received:

  [root@cloud postfix]# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain (127.0.0.1).
    Escape character is '^]'.
    220 cloud.localdomain ESMTP Postfix
    HELO cloud
    250 cloud.localdomain
    MAIL FROM: <send-u...@send-domain.com>
    250 2.1.0 Ok
    RCPT TO: <receive-u...@receive-domain.com>
    250 2.1.5 Ok
    DATA
    354 End data with <CR><LF>.<CR><LF>
    Subject: test message
    test test test
    .
    250 2.0.0 Ok: queued as 99FBC89E0
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.


   This is what that session looks like in the mail log:

Nov 17 14:57:53 ip-10-125-10-29 postfix/qmgr[20746]: 99FBC89E0: 
from=<send-u...@send-domain.com>, size=373, nrcpt=1 (queue active)
Nov 17 14:57:54 ip-10-125-10-29 postfix/smtp[3794]: 99FBC89E0: 
to=<receive-u...@receive-domain.com>, 
relay=bleachers2.mlb.com[66.192.34.20]:25, delay=26, delays=25/0.01/0.52/0.05, 
dsn=2.0.0, status=sent (250 ok:  Message 71193152 accepted)
Nov 17 14:57:54 ip-10-125-10-29 postfix/qmgr[20746]: 99FBC89E0: removed

  Here are the the settings from the config which is shared by the working and 
and non working environment:

  main.cf:
  
  myorigin = $mydomain
  proxy_interfaces = 10.40.27.251 ## <-- the ip address of the problem server
  mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
  unknown_local_recipient_reject_code = 550
  mynetworks_style = subnet
  relay_domains = $mydestination
  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
  alias_database = hash:/etc/postfix/aliases
  alias_maps = hash:/etc/postfix/aliases

 
  
  And these are the contents of the master.cf file


# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache

#

 

I am quite sure that there is some setting (perhaps in main.cf) that needs to 
be customized for this network. However I would greatly appreciate a suggestion 
as to which setting would need to be altered between the two environments.

Thanks in advance!

Tim
 


  
 
 

Reply via email to