LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Relay access denied while sending from external mail clients (http://www.linuxquestions.org/questions/linux-server-73/relay-access-denied-while-sending-from-external-mail-clients-683563/)

spokz 11-15-2008 09:29 AM

Relay access denied while sending from external mail clients
 
I have configured mail server (postfix/courier-imap) and webmail works fine.

But I want to connect to my IMAP server from any location thru mail clients like OE/Thunderbird and send/receive mails. Actually, now I can receive all mail thru OE but sending works only to local maildirs (located at same server as postfix is run).

For example my mail is spokz@mydomain.org and I'm connected to IMAP server at mydomain.org thru Outlook Express. I can send mail to test@mydomain.org but server denies to send mail to test@gmail.com, hotmail.com etc.

Log output:
Quote:

Nov 14 11:20:48 me postfix/smtpd[22501]: connect from localhost[127.0.0.1]
Nov 14 11:20:48 me postfix/smtpd[22501]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <xxx@gmail.com>: Relay access denied; from=<xxx@mydomain.org> to=<xxx@gmail.com> proto=ESMTP helo=<mail.mydomain.org>
Nov 14 11:20:48 me postfix/smtpd[22501]: lost connection after RCPT from localhost[127.0.0.1]
Nov 14 11:20:48 me postfix/smtpd[22501]: disconnect from localhost[127.0.0.1]
postconf -n
Quote:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
disable_vrfy_command = yes
inet_interfaces = all
inet_protocols = all
local_recipient_maps = $alias_maps
mailbox_size_limit = 0
mydestination =
mydomain = mydomain.org
myhostname = mail.mydomain.org
mynetworks = 127.0.0.0/8, 192.168.0.0/16, localhost, localhost.$mydomain, $mydomain, mail.@mydomain
myorigin = /etc/mailname
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
show_user_unknown_table_name = no
smtp_use_tls = no
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = reject_rbl_client sbl-xbl.spamhaus.org
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_etrn_restrictions = reject
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sasl_local_domain =
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_sender_domain, reject_non_fqdn_sender, permit
smtpd_use_tls = no
strict_rfc821_envelopes = yes
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000

pingu 11-15-2008 04:11 PM

When you send mail using an email client you send it from your computer not from your mail-server.
So gmail's mailserver receives a mail with senders domain not equal to the ip it is sent from. This is to prevent spam, you normally use your ISP's mailserver as smtp.
Now I don't know what OE is, maybe it is something that should do the trick I don't really know. Just my 2 cents...

spokz 11-16-2008 09:47 AM

OE = Outlook Express, since I wanted to use my mail server from any locations, also Windows environments :) Hmm, that's a pity that even with IMAP server I cannot send mail to other hosts than local. Or I can't configure it properly that's why I posted here...


All times are GMT -5. The time now is 08:15 AM.