LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-27-2009, 12:17 PM   #1
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Rep: Reputation: 15
Postfix config


Hi All -

Recently set up a server for use with Mailman for listservs in our DMZ. Works great.

We also have an HP 4730mfp device that can e-mail your scans. We've recently switched to Google Apps for EDU for our e-mail and I've been told by HP that this current model does not support autentication (which we need for sending to Google). So...I figured I would just relay e-mails from the HP through our Mailman server since it worked for our Blackboard server (also in the DMZ). The HP is internal.

Doesn't seem to want to work. The HP is at 10.7.2.120 so I went to /etc/postfix/main.cf and added:

Code:
mynetworks = 10.7.0.0/16
and restarted postfix -- didn't work. Matter of fact Mailman stopped sending any e-mails when someone tried to send to a mailing list. So I commented that out, restarted postfix and all is fine.

Is there a way to be able to relay through Mailman. I'm thinking Blackboard worked fine because they are on the same subnet in the DMZ.

Any help is appreciated!!
 
Old 08-27-2009, 12:54 PM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hello,

We use Google for Enterprises at our company and I got Postfix relaying directly to Google. Every application in our LAN relays mails to that local server and that one in his turn relays directly to Google.

I'm not at the office right now and don't remember the config exactly so tomorrow when I get in, I'll post the config for postfix that works for us.

Kind regards,

Eric
 
Old 08-27-2009, 02:08 PM   #3
VeeDubbs
Member
 
Registered: Feb 2006
Location: Wisconsin
Distribution: SuSe 10. Ubuntu
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by EricTRA View Post
Hello,

We use Google for Enterprises at our company and I got Postfix relaying directly to Google. Every application in our LAN relays mails to that local server and that one in his turn relays directly to Google.

I'm not at the office right now and don't remember the config exactly so tomorrow when I get in, I'll post the config for postfix that works for us.

Kind regards,

Eric
That'd be great! Thanks EricTRA!
 
Old 08-28-2009, 02:07 AM   #4
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291Reputation: 1291
Hi VeeDubbs,

As promised. I've gathered the info from the following sites:
http://bookmarks.honewatson.com/2008...il-smtp-relay/
http://ubuntu-tutorials.com/2008/11/...-smtpgmailcom/
http://www.wormly.com/blog/2008/11/0...-smtp-postfix/

First of all, this is my /etc/postfix/main.cf (private information changed of course). You'll notice that the authentication part is commented out. That's because we are behind fixed IP's that are listed with Google on our domain. They accept our server(s) as trusted and for relaying.
Code:
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = srvnagios.OURDOMAIN.es
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = smtp.gmail.com, localhost, srvnagios.OURDOMAIN.es
relayhost = 
mynetworks = 172.25.0.0/16,127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = localhost,172.25.192.35
canonical_maps = hash:/etc/postfix/canonical
relay_domains = srvnagios.OURDOMAIN.es

#auth
#smtp_sasl_auth_enable=yes
#smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

#tls
#smtp_use_tls = yes
#smtp_sasl_security_options = noanonymous
#smtp_sasl_tls_security_options = noanonymous
#smtp_tls_note_starttls_offer = yes
#tls_random_source = dev:/dev/urandom
#smtp_tls_scert_verifydepth = 5
#smtp_tls_key_file=/etc/postfix/certs/csuOURDOMAIN.key
#smtp_tls_cert_file=/etc/postfix/certs/csuOURDOMAIN.pem
#smtpd_tls_ask_ccert = yes
#smtpd_tls_req_ccert =no
#smtp_tls_enforce_peername = no
From this host (srvnagios) I can send mails directly to any mail address, it gets relayed perfectly through smtp.gmail.com.

Furthermore we have other servers that run applications that need to be able to send mail (errors, warnings, reports).

This is what I have in /etc/postfix/main.cf on those servers.
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = srvsquid1
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = srvnagios.OURDOMAIN.es
relayhost = 
mynetworks = 172.25.0.0/16,127.0.0.1/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = localhost,172.25.2.199
This setup works perfect for us, I hope it helps you configure your server for your needs.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help in postfix config problem karthi26 Linux - Server 1 05-21-2008 02:36 AM
postfix Config ratcateme Linux - Software 4 02-19-2008 08:15 AM
Help ID Postfix Config Entry? carlosinfl Linux - Server 3 02-16-2008 05:11 PM
please help me with my postfix config carlene Linux - Networking 1 10-17-2006 10:45 PM
Postfix config on Debian thebiz Linux - Networking 2 10-15-2003 12:50 PM


All times are GMT -5. The time now is 11:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration