LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-16-2008, 10:14 AM   #1
halvorls
Member
 
Registered: Jun 2008
Posts: 78

Rep: Reputation: 15
Smile Postfix main.cf


Hi!

I have make a main .cf file to postfix, what hvae i do wrong?

Here is the config file:

# 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
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_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = hd.hvalstaddata.com
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

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

myhostname = hd.hvalstaddata.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_maps = hash:/etc/postfix/virtual
myorigin = hd.hvalstaddata.com
relayhost = mail.broadpark.no

broken_sasl_auth_clients = yes
 
Old 09-16-2008, 10:32 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,442

Rep: Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099
Quote:
Originally Posted by halvorls View Post
Hi!

I have make a main .cf file to postfix, what hvae i do wrong?

Here is the config file:
Don't know what you've done wrong...since you actually haven't said what isn't working, what errors you're getting, and what version/distro of Linux you're using, or anything about your environment.
 
Old 09-16-2008, 11:21 AM   #3
halvorls
Member
 
Registered: Jun 2008
Posts: 78

Original Poster
Rep: Reputation: 15
The problem is:

- I can not send mail to an emailadress outside domain.

- When i try to send a mail to a mailadress outside domain, i get a error "Relay access denied".


What is wrong in my main.cf file?

main.cf file:


# 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
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

myhostname = hd.hvalstaddata.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
virtual_alias_maps = hash:/etc/postfix/virtual
myorigin = $mydomain
relayhost = smtp.broadpark.no

Last edited by halvorls; 09-16-2008 at 11:28 AM.
 
Old 09-16-2008, 11:32 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 22,442

Rep: Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099Reputation: 6099
Quote:
Originally Posted by halvorls View Post
The problem is:

- I can not send mail to an emailadress outside domain.

- When i try to send a mail to a mailadress outside domain, i get a error "Relay access denied".


What is wrong in my main.cf file?

main.cf file:

relayhost = smtp.broadpark.no
The relay host at smtp.broadpark.no has to be set up to ALLOW you to send mail through them. If it's not, it won't work.

If this is your ISP (again, you don't say anything about your environment or give details), they may require authentication. That will also have to be put in (follow the directions for Postfix configuration for that).
 
Old 09-24-2008, 06:16 PM   #5
halvorls
Member
 
Registered: Jun 2008
Posts: 78

Original Poster
Rep: Reputation: 15
Hi!

But whay i get the error acsess denied?
 
Old 09-24-2008, 07:38 PM   #6
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Post the exact error messages from the log please, and when posting config info for postfix, always post the output of "postconf -n"

Do you get relay access denied when you send from the server or from a machine connected to the server? If the problem is from a machine connected to the server, you will either need to add that network subnet to the mynetworks parameter or set up authentication for clients of different subnets (only clients on mynetworks can relay by default, and you have this set to localhost).

If the problem is the relayhost as suggested above, add

Code:
debug_peer_level = 2
debug_peer_list = smtp.broadpark.no
to main.cf and restart postfix. That problem is most likely authentication at the relay, and we can talk you through that pretty easily.
 
Old 09-25-2008, 07:34 AM   #7
halvorls
Member
 
Registered: Jun 2008
Posts: 78

Original Poster
Rep: Reputation: 15
The problem is from the server and from the client conected to server!
 
Old 09-25-2008, 08:17 AM   #8
linuxgurusa
Member
 
Registered: Mar 2008
Location: Namibia, Swakopmund
Distribution: Redhat, Fedora, Centos, ClearOS, Mandrake
Posts: 150

Rep: Reputation: 29
Sometimes one need a CIA degree in decyphering some posts ;-)

In your main.cf file, where you have the following line :

mynetworks = 127.0.0.0/8

YOu need to add your lan range that needs to send mail via this server

mynetworks = 127.0.0.0/8,192.168.0.0/24 for example
 
Old 09-25-2008, 04:03 PM   #9
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
More like the whole CIA
 
  


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
postfix main.cf and master.cf configuration husseinalbazzar Linux - Newbie 10 03-19-2008 10:18 AM
postfix main.cf file okidokie Linux - Server 1 02-12-2007 06:04 AM
postfix - main.cf & config varun_saa Mandriva 1 09-12-2005 11:15 AM
postfix main.cf illtbagu Linux - Software 8 07-21-2003 11:35 PM
POSTFIX main.cf question tuantran Linux - Networking 2 06-16-2002 05:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration