From: Rui Francisco on
Hi,

i would liek to know if its possible to forward emails in postfix with
virtual users, or to put a vacation message.

All the users are saved in a mysql database and postfix delivers emails
normally. The problem is how to forward emails. I tried to create a
virtual alias maps in a file with the contents from .forward files and
from the database but even so its delivered locally.

What am i doing wrong ?

Thanks in advance
Rui


bellow there is the curent configuration:

soft_bounce = no
smtpd_banner = $myhostname
biff = no
append_dot_mydomain = no
inet_interfaces = all
myhostname = hostname
myorigin = $myhostname
mydomain = domain
mynetworks = 127.0.0.0/8
mynetworks_style = host
mydestination = $myhostname, localhost.$mydomain, localhost
alias_maps = hash:/etc/postfix/aliases, $virtual_alias_maps
local_recipient_maps = $alias_maps, $virtual_mailbox_maps
#local_transport = local
#transport_maps = proxy:mysql:/etc/postfix/mysql_transport.cf
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
#html_directory = /usr/local/share/doc/postfix
disable_vrfy_command = no
mailbox_size_limit = 0
owner_request_special = no
recipient_delimiter = +
home_mailbox = Maildir/
mail_owner = postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
queue_directory = /var/spool/postfix
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
mail_spool_directory = /var/spool/mail
manpage_directory = /usr/share/man
#setgid_group = maildrop
unknown_local_recipient_reject_code = 450

########### Virtual Domains Users ######
#virtual_transport = virtual
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
# ,proxy:mysql:/etc/postfix/mysql_virtual_alias_domains_maps.cf

virtual_mailbox_domains =
proxy:mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_maps =
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf

virtual_mailbox_base = /
relay_domains = proxy:mysql:/etc/postfix/mysql_relay_domains_maps.cf

#proxy_read_maps = $local_recipient_maps $mydestination
$virtual_alias_maps $virtual_mailbox_maps $virtual_mailbox_domains
$relay_domains $virtual_mailbox_limit_maps

proxy_read_maps = $local_recipient_maps $mydestination
$virtual_alias_maps $virtual_mailbox_maps $relay_domains
$virtual_mailbox_domains

virtual_minimum_uid = 150
virtual_uid_maps = static:508
virtual_gid_maps = static:503
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn
his disk space quota.
virtual_overquota_bounce = yes


# Habilita requisito de HELO/EHLO
smtpd_helo_required = yes

# ---- Autentificao no SMTP ---- #
smtpd_sasl_type = dovecot
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
#smtpd_sasl_security_options = noanonymous
#smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes

# Secure SMTP-AUTH
smtpd_use_tls = yes
#smtpd_tls_enforce_tls = yes
smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem


# Restricao durante comando HELO/EHLO
smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/access,
reject_rbl_client domain-name, reject_unknown_sender_domain,
reject_unauth_pipelining,
reject_unknown_recipient_domain,
reject_non_fqdn_sender,permit_sasl_authenticated,
reject_non_fqdn_recipient, reject_unauth_destination

message_size_limit = 20480000

forward_path = $home/.forward${recipient_delimiter}${extension},
$home/.forward, $home/Maildir/.forward
transport_destination_recipient_limit = 1
#virtual_transport = maildrop


--
Rui Francisco - blackmolly(a)gmail.com
S�o Jo�o dos Montes - Portugal
-----------------------------------------------------

From: Stan Hoeppner on
Rui Francisco put forth on 6/21/2010 7:22 PM:
> Hi,
>
> i would liek to know if its possible to forward emails in postfix with
> virtual users, or to put a vacation message.
>
> All the users are saved in a mysql database and postfix delivers emails
> normally. The problem is how to forward emails. I tried to create a
> virtual alias maps in a file with the contents from .forward files and
> from the database but even so its delivered locally.

This should be a good starting point. Google is your friend here. I found
tons of related how-to's for this, they each may not exactly match our
environment/setup.

http://hostingsoftware.net/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=56

This may help as well:

http://www.howtoforge.com/autoresponders_for_virtual_postfix_users

--
Stan