Hello everyone,

I am trying to get postfix set up on my Debian system such that an
authenticated virtual user can send email to any public address on the
internet.  All the solutions I have found while googling suggest
inflexible solutions such as adding 'gmail.com' to mydestination.
Could you please point me in the right direction for configuring
postfix to auth via the plain or login mechanism (these show with an
EHLO currently) and then allow relay of mails to external domains?

At present, such messages are met with a 554:

554 5.7.1 <property.of.mike.jo...@gmail.com>: Recipient address
rejected: Access denied

Here are two test cases for my system, example.com:

1:
Connect and auth to example.com
Send mail from mwjo...@example.com to property.of.mike.jo...@gmail.com
Send successful
Close connection

2:
Connect to example.com
Attempt to send mail from evils...@spam.cn to supp...@newegg.com
Get rejected
Close connection

Here is my postconf -n:

$ sudo postconf -n
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = .system/
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps =
mailbox_command =
mailbox_size_limit = 0
mydestination = mail.example.com, localhost.localdomain, localhost
myhostname = example.com
mynetworks = 127.0.0.0/8 1.2.3.4
myorigin = /etc/mailname
recipient_delimiter = +
relayhost = mail.example.com
smtp_tls_note_starttls_offer = yes
smtpd_delay_reject = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/apache2/ssl/cert-mwjones.com.crt
smtpd_tls_key_file = /etc/apache2/ssl/mwjones.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_gid_maps = static:1030
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = /etc/postfix/vdomain
virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_minimum_uid = 1030
virtual_uid_maps = static:1030


What do I need to add to main.cf?

Thanks,
mwjones

Reply via email to