LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix - relay domains (https://www.linuxquestions.org/questions/linux-server-73/postfix-relay-domains-687345/)

noir911 11-30-2008 09:53 PM

Postfix - relay domains
 
I'm running Postfix on the postfix server. I have configured one of my sendmail server's access file to send all root@localhost mails to the postfix server. On the postfix server I edited the /etc/aliases file and addedd "root: email1@domain.com, email2@domain.com, emailN@domain.com" and I also edited the /etc/postfix/main.cf file and changed the "relay_domains = $mydestination" to "relay_domains = my_sendmail_server.domain.com" and restarted postfix. But as soon as I send mail from sendmail server, I can see "Deferred: Connection refused by postfix server"

How do I relay via postfix? Thanks for any help.

billymayday 11-30-2008 09:59 PM

Can you post the output of "postconf -n"?

noir911 11-30-2008 10:31 PM

Quote:

Originally Posted by billymayday (Post 3359977)
Can you post the output of "postconf -n"?

Sure. Here it is:

Code:

alias_maps = hash:/etc/aliases
biff = no
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain
myhostname = postfix.domain.com
mynetworks = <IP_of_the_sendmail_server_trying_to_relay_via_postfix>
mynetworks_style = host
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relay_domains = $mydestination
relayhost = <postfix_relays_via_this_host.com>
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_client_restrictions = hash:/etc/postfix/access
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_8bitmime = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual


noir911 11-30-2008 10:38 PM

Stupid mistake: postfix was listening on the loopback address; changed in the main.cf from "inet_interfaces = localhost" to inet_interfaces = localhost, <IP_of_the_postfix_server>" and restarted postfix and everything is good.


All times are GMT -5. The time now is 07:33 PM.