LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Postfix Courier Amavis - Can recieve but not send (https://www.linuxquestions.org/questions/linux-newbie-8/postfix-courier-amavis-can-recieve-but-not-send-834322/)

jchambers 09-24-2010 02:04 PM

Postfix Courier Amavis - Can recieve but not send
 
Hello --

I can send emails to local accounts but not out to the world.

Here are the refrences I used to set things up.

http://workaround.org/ispmail/sarge
http://flurdy.com/docs/postfix/


I was able to send and receive after the "basic" setup.
I added amavis-new and I am pretty sure that it stopped working then.
(late nights, lots of changes/tries not 100% sure any more)

Went back to basics trying to send a test email from telnet (on the server).

Code:

mail:~# telnet mail.my-server.com 25
Trying 216.240.35.89...
Connected to mail.my-server.com.
Escape character is '^]'.
220 mail.my-server.com ESMTP Postfix (Debian/GNU)
EHLO  mail.my-server.com
250-mail.my-server.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-STARTTLS
250-AUTH CRAM-MD5 DIGEST-MD5 LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: <user@my-server.com>
250 2.1.0 Ok
rcpt to: <some.email@hotmail.com>
554 5.7.1 <some.email@hotmail.com>: Relay access denied
quit
221 2.0.0 Bye

main.cf
Code:

mail:~# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = no
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
default_transport = error
disable_vrfy_command = yes
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 7d
minimal_backoff_time = 1000s
mydestination =
mydomain = my-server.com
myhostname = mail.my-server.com
mynetworks = 216.240.35.75 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_domains =
relay_transport = error
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_delay_reject = yes
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 20
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, check_policy_service inet:127.0.0.1:10025
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_soft_error_limit = 10
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450
virtual_alias_domains =
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000


master.cf
Code:

#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#              (yes)  (yes)  (yes)  (never) (100)
# ==========================================================================
smtp      inet  n      -      -      -      -      smtpd
#submission inet n      -      -      -      -      smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps    inet  n      -      -      -      -      smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n      -      -      -      -      qmqpd
pickup    fifo  n      -      -      60      1      pickup
        -o content_filter=
        -o receive_override_options=no_header_body_checks
cleanup  unix  n      -      -      -      0      cleanup
qmgr      fifo  n      -      n      300    1      qmgr
#qmgr    fifo  n      -      -      300    1      oqmgr
tlsmgr    unix  -      -      -      1000?  1      tlsmgr
rewrite  unix  -      -      -      -      -      trivial-rewrite
bounce    unix  -      -      -      -      0      bounce
defer    unix  -      -      -      -      0      bounce
trace    unix  -      -      -      -      0      bounce
verify    unix  -      -      -      -      1      verify
flush    unix  n      -      -      1000?  0      flush
proxymap  unix  -      -      n      -      -      proxymap
proxywrite unix -      -      n      -      1      proxymap
smtp      unix  -      -      -      -      -      smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay    unix  -      -      -      -      -      smtp
        -o smtp_fallback_relay=
#      -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq    unix  n      -      -      -      -      showq
error    unix  -      -      -      -      -      error
retry    unix  -      -      -      -      -      error
discard  unix  -      -      -      -      -      discard
local    unix  -      n      n      -      -      local
virtual  unix  -      n      n      -      -      virtual
lmtp      unix  -      -      -      -      -      lmtp
anvil    unix  -      -      -      -      1      anvil
scache    unix  -      -      -      -      1      scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -      n      n      -      -      pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -      n      n      -      -      pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -      n      n      -      -      pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp    unix  -      n      n      -      -      pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix        -        n        n        -        2        pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman  unix  -      n      n      -      -      pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}


amavis unix - - - - 2 smtp
  -o smtp_data_done_timeout=1200
  -o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
        -o content_filter=
        -o local_recipient_maps=
        -o relay_recipient_maps=
        -o smtpd_restriction_classes=
        -o smtpd_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
        -o smtpd_bind_address=127.0.0.1

netstat
Code:

mail:~# netstat -napt
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address          Foreign Address        State      PID/Program name
tcp        0      0 127.0.0.1:10024        0.0.0.0:*              LISTEN      1791/amavisd (maste
tcp        0      0 127.0.0.1:10025        0.0.0.0:*              LISTEN      12874/master
tcp        0      0 0.0.0.0:3306            0.0.0.0:*              LISTEN      1853/mysqld
tcp        0      0 127.0.0.1:783          0.0.0.0:*              LISTEN      1941/spamd.pid
tcp        0      0 0.0.0.0:111            0.0.0.0:*              LISTEN      1527/portmap
tcp        0      0 127.0.0.1:945          0.0.0.0:*              LISTEN      2465/famd
tcp        0      0 0.0.0.0:22              0.0.0.0:*              LISTEN      1764/sshd
tcp        0      0 0.0.0.0:45494          0.0.0.0:*              LISTEN      1538/rpc.statd
tcp        0      0 0.0.0.0:25              0.0.0.0:*              LISTEN      12874/master
tcp        0      0 127.0.0.1:57919        127.0.0.1:3306          TIME_WAIT  -
tcp        0      0 127.0.0.1:10025        127.0.0.1:42993        TIME_WAIT  -
tcp        0      0 xxx.xxx.xx.xx:22        75.83.xx.xx:52252      ESTABLISHED 12256/sshd: root@no
tcp        0    152 xxx.xxx.xx.xx:22        75.83.xx.xx:51770      ESTABLISHED 11181/1
tcp        0      0 xxx.xxx.xx.xx:22        75.83.xx.xx:51765      ESTABLISHED 11154/0
tcp        0      0 xxx.xxx.xx.xx:22        75.83.xx.xx:51528      ESTABLISHED 10793/sshd: root@no
tcp        0      0 127.0.0.1:3306          127.0.0.1:57922        TIME_WAIT  -
tcp6      0      0 :::993                  :::*                    LISTEN      2318/couriertcpd
tcp6      0      0 :::995                  :::*                    LISTEN      2336/couriertcpd
tcp6      0      0 :::110                  :::*                    LISTEN      2324/couriertcpd
tcp6      0      0 :::143                  :::*                    LISTEN      2306/couriertcpd
tcp6      0      0 :::80                  :::*                    LISTEN      2537/apache2
tcp6      0      0 :::22                  :::*                    LISTEN      1764/sshd
tcp6      0      0 xxx.xxx.xx.xx:80        75.83.xx.xx:52607      TIME_WAIT  -


Any and all help is appreciated.

Jon

jchambers 09-24-2010 05:31 PM

In the mail.log I am seeing this

Code:

Sep 24 15:25:23 mail postfix/smtpd[20057]: connect from localhost[127.0.0.1]
Sep 24 15:25:34 mail postfix/smtpd[20057]: too many errors after UNKNOWN from localhost[127.0.0.1]


jchambers 09-24-2010 05:40 PM

Here is the startup log.
Maybe I will get a reply if I post enough info... :)


mail.log (statup)
Code:

Sep 24 15:35:54 mail postfix/master[20747]: daemon started -- version 2.5.5, configuration /etc/postfix
Sep 24 15:35:54 mail authdaemond: modules="authmysql", daemons=5
Sep 24 15:35:54 mail authdaemond: Installing libauthmysql
Sep 24 15:35:54 mail authdaemond: Installation complete: authmysql
Sep 24 15:35:57 mail amavis[20911]: logging initialized, log level 3, syslog: amavis.mail
Sep 24 15:35:57 mail amavis[20911]: starting.  /usr/sbin/amavisd-new at mail.my-server.com amavisd-new-2.6.1 (20080629), Unicode aware, LANG="en_US.UTF-8"
Sep 24 15:35:57 mail amavis[20911]: user=, EUID: 107 (107);  group=, EGID: 111 111 (111 111)
Sep 24 15:35:57 mail amavis[20911]: Perl version              5.010000
Sep 24 15:35:57 mail amavis[20941]: Net::Server: Process Backgrounded
Sep 24 15:35:57 mail amavis[20941]: Net::Server: 2010/09/24-15:35:57 Amavis (type Net::Server::PreForkSimple) starting! pid(20941)
Sep 24 15:35:57 mail amavis[20941]: Net::Server: Binding to UNIX socket file /var/lib/amavis/amavisd.sock using SOCK_STREAM
Sep 24 15:35:57 mail amavis[20941]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1
Sep 24 15:35:57 mail amavis[20941]: Net::Server: Group Not Defined.  Defaulting to EGID '111 111'
Sep 24 15:35:57 mail amavis[20941]: Net::Server: User Not Defined.  Defaulting to EUID '107'
Sep 24 15:35:57 mail amavis[20941]: config files read: /usr/share/amavis/conf.d/10-debian_scripts, /usr/share/amavis/conf.d/20-package, /etc/amavis/conf.d/01-debian, /etc/amavis/conf.d/05-domain_id, /etc/amavis/conf.d/05-node_id, /etc/amavis/conf.d/15-av_scanners, /etc/amavis/conf.d/15-content_filter_mode, /etc/amavis/conf.d/20-debian_defaults, /etc/amavis/conf.d/25-amavis_helpers, /etc/amavis/conf.d/30-template_localization, /etc/amavis/conf.d/50-user
Sep 24 15:35:57 mail amavis[20941]: Module Amavis::Conf        2.103
Sep 24 15:35:57 mail amavis[20941]: Module Archive::Zip        1.18
Sep 24 15:35:57 mail amavis[20941]: Module BerkeleyDB          0.34
Sep 24 15:35:57 mail amavis[20941]: Module Compress::Zlib      2.012
Sep 24 15:35:57 mail amavis[20941]: Module Convert::TNEF      0.17
Sep 24 15:35:57 mail amavis[20941]: Module Convert::UUlib      1.11
Sep 24 15:35:57 mail amavis[20941]: Module Digest::MD5        2.36_01
Sep 24 15:35:57 mail amavis[20941]: Module IO::Socket::INET6  2.54
Sep 24 15:35:57 mail amavis[20941]: Module MIME::Entity        5.427
Sep 24 15:35:57 mail amavis[20941]: Module MIME::Parser        5.427
Sep 24 15:35:57 mail amavis[20941]: Module MIME::Tools        5.427
Sep 24 15:35:57 mail amavis[20941]: Module Mail::Header        2.03
Sep 24 15:35:57 mail amavis[20941]: Module Mail::Internet      2.03
Sep 24 15:35:57 mail amavis[20941]: Module Net::Server        0.97
Sep 24 15:35:57 mail amavis[20941]: Module Socket6            0.20
Sep 24 15:35:57 mail amavis[20941]: Module Time::HiRes        1.9711
Sep 24 15:35:57 mail amavis[20941]: Module Unix::Syslog        1.1
Sep 24 15:35:57 mail amavis[20941]: Amavis::DB code      loaded
Sep 24 15:35:57 mail amavis[20941]: Amavis::Cache code  loaded
Sep 24 15:35:57 mail amavis[20941]: SQL base code        NOT loaded
Sep 24 15:35:57 mail amavis[20941]: SQL::Log code        NOT loaded
Sep 24 15:35:57 mail amavis[20941]: SQL::Quarantine      NOT loaded
Sep 24 15:35:57 mail amavis[20941]: Lookup::SQL code    NOT loaded
Sep 24 15:35:57 mail amavis[20941]: Lookup::LDAP code    NOT loaded
Sep 24 15:35:57 mail amavis[20941]: AM.PDP-in proto code loaded
Sep 24 15:35:57 mail amavis[20941]: SMTP-in proto code  loaded
Sep 24 15:35:57 mail amavis[20941]: Courier proto code  NOT loaded
Sep 24 15:35:57 mail amavis[20941]: SMTP-out proto code  loaded
Sep 24 15:35:57 mail amavis[20941]: Pipe-out proto code  NOT loaded
Sep 24 15:35:57 mail amavis[20941]: BSMTP-out proto code NOT loaded
Sep 24 15:35:57 mail amavis[20941]: Local-out proto code loaded
Sep 24 15:35:57 mail amavis[20941]: OS_Fingerprint code  NOT loaded
Sep 24 15:35:57 mail amavis[20941]: ANTI-VIRUS code      NOT loaded
Sep 24 15:35:57 mail amavis[20941]: ANTI-SPAM code      NOT loaded
Sep 24 15:35:57 mail amavis[20941]: ANTI-SPAM-SA code    NOT loaded
Sep 24 15:35:57 mail amavis[20941]: Unpackers code      loaded
Sep 24 15:35:57 mail amavis[20941]: DKIM code            NOT loaded
Sep 24 15:35:57 mail amavis[20941]: Tools code          NOT loaded
Sep 24 15:35:57 mail amavis[20941]: Found $file            at /usr/bin/file
Sep 24 15:35:57 mail amavis[20941]: No $dspam,            not using it
Sep 24 15:35:57 mail amavis[20941]: No $altermime,        not using it
Sep 24 15:35:57 mail amavis[20941]: Internal decoder for .mail
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .F 
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .Z    at /bin/uncompress
Sep 24 15:35:57 mail amavis[20941]: Internal decoder for .gz 
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .gz  at /bin/gzip -d (backup, not used)
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .bz2  at /bin/bzip2 -d
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .lzo  tried: lzop -d
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .rpm  tried: rpm2cpio.pl, rpm2cpio
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .cpio tried: pax
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .cpio at /bin/cpio
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .tar  tried: pax
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .tar  at /bin/cpio
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .deb  at /usr/bin/ar
Sep 24 15:35:57 mail amavis[20941]: Internal decoder for .zip
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .7z  tried: 7zr, 7za, 7z
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .rar
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .arj  tried: arj, unarj
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .arc  tried: nomarch, arc
Sep 24 15:35:57 mail amavis[20941]: Found decoder for    .zoo  at /usr/bin/zoo
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .lha
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .doc  tried: ripole
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .cab  tried: cabextract
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .tnef
Sep 24 15:35:57 mail amavis[20941]: Internal decoder for .tnef
Sep 24 15:35:57 mail amavis[20941]: No decoder for      .exe  tried: arj, unarj
Sep 24 15:35:57 mail amavis[20941]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.34, libdb 4.6
Sep 24 15:35:57 mail amavis[20944]: TIMING [total 7 ms] - bdb-open: 7 (100%)100, rundown: 0 (0%)100
Sep 24 15:35:57 mail amavis[20945]: TIMING [total 13 ms] - bdb-open: 13 (100%)100, rundown: 0 (0%)100
Sep 24 15:35:58 mail spamd[20943]: logger: removing stderr method
Sep 24 15:36:03 mail spamd[20947]: spamd: server started on port 783/tcp (running version 3.2.5)
Sep 24 15:36:03 mail spamd[20947]: spamd: server pid: 20947
Sep 24 15:36:03 mail spamd[20947]: spamd: server successfully spawned child process, pid 21182
Sep 24 15:36:03 mail spamd[20947]: spamd: server successfully spawned child process, pid 21183
Sep 24 15:36:03 mail spamd[20947]: prefork: child states: II
Sep 24 15:36:07 mail postfix/smtpd[21184]: connect from ip-117.email.united.com[206.165.246.117]
Sep 24 15:36:07 mail postfix/smtpd[21188]: connect from localhost[127.0.0.1]
Sep 24 15:36:14 mail postfix/postfix-script[21328]: refreshing the Postfix mail system
Sep 24 15:36:14 mail postfix/master[20747]: reload configuration /etc/postfix
Sep 24 15:36:14 mail postfix/anvil[21186]: statistics: max connection rate 1/60s for (smtp:206.x.x.x) at Sep 24 15:36:07
Sep 24 15:36:14 mail postfix/anvil[21186]: statistics: max connection count 1 for (smtp:206.x.x.x) at Sep 24 15:36:07
Sep 24 15:36:14 mail postfix/anvil[21186]: statistics: max cache size 1 at Sep 24 15:36:07


DotHQ 11-24-2010 07:43 PM

Did you every find a fix? I have the same problem.


All times are GMT -5. The time now is 06:20 PM.