Thanks for the reply. Please see the answers to the questions below
starting with *SGS::.*
sgs.
mouss said the following on 10/11/2008 6:25 PM:
sgsweb a écrit :
I have a configuration of the postfix server using MySQL. I have the
postfix_virtual entry where the destination includes several e-mails,
some of which are outside of my domains.
we don't really know what you mean by postfix_virtual. use the names of
the parameters that are accepted by postfix. for example
virtual_alias_maps.
*SGS:: Yes. This is virtual_alias_maps. Since I use the database
configuration, the table is called postfix_virtual as described in one
of the "How tos" on postfix.org.*
E.g.,
email='[EMAIL PROTECTED]';
destination='[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED]'
As you can see, my destination e-mail addresses encompasses several
domains. I like to be able to have anyone relay e-mail to these
addresses if they are sending to '[EMAIL PROTECTED]'.
if companyname.com is one of your domains, then relay is allowed by
default. if that doesn't work for you, please show
- output of 'postconf -n'
- logs showing the relay access denied
*SGS:: This is exactly what I thought also. companyname.com is my
domain that I host on my e-mail server. Now, if I am sending the e-mail
from companyname.com, then the e-mail goes to everyone. If I send it
from say yahoo.com, then I get the relay denied error.
That is, if the sender e-mail address is [EMAIL PROTECTED], then it
gets relayed to all of the alias e-mail addresses. If the sender e-mail
address is [EMAIL PROTECTED], then it gets a relay error.
I am including my output from postconf -n and log message.
POSTCONF -N
------------------------------
alias_maps = mysql:/etc/postfix/mysql/mysql-aliases.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = /etc/postfix/html
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
mail_owner = postfix
mailbox_size_limit = 5000000000
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 4294967296
mydestination = $myhostname
mydomain = websulting.com
myhostname = mail01.websulting.com
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /etc/postfix/readme
relocated_maps = mysql:/etc/postfix/mysql/mysql-relocated.cf
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_restrictions = check_client_access
mysql:/etc/postfix/mysql/mysql-client.cf
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_etrn_restrictions = reject
smtpd_helo_required = yes
smtpd_recipient_restrictions =
permit_mynetworks,permit_sasl_authenticated,
check_recipient_access
mysql:/etc/postfix/mysql/mysql-recipient.cf,reject_unauth_destination,permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = check_sender_access
mysql:/etc/postfix/mysql/mysql-sender.cf
transport_maps = mysql:/etc/postfix/mysql/mysql-transport.cf
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql-virtual.cf
virtual_gid_maps = mysql:/etc/postfix/mysql/mysql-virtual-gid.cf
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql-virtual-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql-virtual-maps.cf
virtual_transport = maildrop
virtual_uid_maps = mysql:/etc/postfix/mysql/mysql-virtual-uid.cf
**------------------------------ END OF POSTCONF -N
-----------------------------RELAY ERROR LOG
Oct 11 13:49:02 mail01 postfix/smtpd[4202]: NOQUEUE: reject: RCPT from
web33504.mail.mud.yahoo.com[68.142.206.153]: 554
<[EMAIL PROTECTED]>: Relay access denied; from=<[EMAIL PROTECTED]>
to=<[EMAIL PROTECTED]> proto=SMTP helo=<web33504.mail.mud.yahoo.com>
*
That is, if the e-mail address is in the destination field for the
postfix_virtual table, then it should relay this e-mail. Currently, I
get a "Relay Access Denied" if the sender is not from my e-mail domain.
what do you mean by "sender is not from my e-mail domain"? if you allow
relay based on sender address, then you are an open relay.
*SS:: As described above, if the sender e-mail account is not from
"companyname.com" (such as [EMAIL PROTECTED]), then it does not get sent.*
Is there a way to do this?
thanks,
sgs.