LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 08-08-2008, 09:57 PM   #1
maskiepop
Member
 
Registered: Jul 2008
Posts: 34

Rep: Reputation: 15
Configuring Postfix in Ubuntu


Hi. I am trying to install Postfix in my Ubuntu 8.04. I want to install TikiWiki (TW) locally, hence my interest in Postfix. TW emails a new user right after registration.

This is my set-up:
o I do not have a registered domain name. I just made one up, for local use -- mydom.org.
o I have a unix user id, i.e myunixid.
o I also have an email account with my ISP: myemacct@myISP.com.

I believe TW will be sending an email to the registering user as www-data@localhost. I say I believe because I haven't been able to send an email yet from TW. I wanted to to do something similar with sendmail before. Didn't get very far; so I gave up on sendmail.

This is hard -- rather like being thrown into the deep-end of a pool. So I'd appreciate very much any help you guys can give me.

What I want to happen is for TW to send an email to the newly registered user as: myemacct@myISP.com.

Here's what's in my /etc/postfix/aliases:
--------------------------------
root: myunixid
clamav: root

--------------------------------

Should that be something like this:
--------------------------------
root: myemacct
www-data: myemacct
clamav: root
--------------------------------

Here's what's in my /etc/mailname: smtp.mydom.org

In my /etc/postfix/main.cf:
---------------------------
myorigin = mydom.org
relayhost = mail.myISP.com
# masquerade_domains = sub.domain.com !sub.dyndomain.com
# masquerade_exceptions = root
---------------------------

I feel I should uncomment masquerade_domains, but I am not exactly sure about the syntax and the parameters to use.

In the virtual_mailbox_maps, virtual_uid_maps, virtual_gid_maps, virtual_alias_maps, virtual_mailbox_domains I have a user=mail entry.

How does one test this? I have installed mutt. Can I test this setup with that? Where are the messages and the errors logged?

I am using this howto: http://flurdy.com/docs/postfix/#editions

TIA

Last edited by maskiepop; 08-08-2008 at 10:12 PM.
 
Old 08-08-2008, 10:13 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
The trick with setting something like postfix up is to get an absolute basic installation working before adding fancy bits.

So, first thing is to send yourself and email, something like

echo "hello" | mail -s test myunixid

to see what happens (you should get a message to your local user.

I'd expect this to appear to come from myunixid@mydom.org (given your myorigin setting).
 
Old 08-09-2008, 03:24 AM   #3
maskiepop
Member
 
Registered: Jul 2008
Posts: 34

Original Poster
Rep: Reputation: 15
Hi. Thanks for your reply to my post.

I ran the test you suggested: echo "hello" | mail -s test myunixid

o I did not get any email for myunixid. The mail.log did state that the message was accepted by the relayhost, myISP.com. But I can't understand how myISP.com can possibly forward this mail to myunixid, such that I will be able to read the email locally.

o I ran a second test: echo "hello" | mail -s test --to someone@gmail.com. This one was able to send the email successfully. It has a from id of myunixid@mydom.org.

So at the moment, I can send out emails but not received any. Presumably, I will be able to receive emails, if I register my domain name; and bypass the relayhost as well?

Last edited by maskiepop; 08-09-2008 at 03:27 AM.
 
Old 08-09-2008, 03:27 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Can you post "postconf -n", but your problem is probably that you don't have

mydestination = mydom.org

in main.cf
 
Old 08-09-2008, 11:53 AM   #5
maskiepop
Member
 
Registered: Jul 2008
Posts: 34

Original Poster
Rep: Reputation: 15
You're right about mydestination not having mydom.org for it's value. The value of mydestination was null as reported via postconf -n. I tried subsequently to set the value of mydestination to mydom.org in /etc/postfix/main.cf. It seems to me the value wasn't accepted; the postconf -n output still shows the value of mydestination as null. Even after restarting my computer. Any idea as to why I can't set the value of the mydestination variable to mydom.org via the /etc/postfix/main.cf?

Here is the output of postconf -n:

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
delay_warning_time = 4h
disable_vrfy_command = yes
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
local_recipient_maps =
mailbox_size_limit = 0
maximal_backoff_time = 8000s
maximal_queue_lifetime = 7d
minimal_backoff_time = 1000s
mydestination =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
myorigin = mydom.org
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
relayhost = mail.myISP.com
smtp_helo_timeout = 60s
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org
smtpd_delay_reject = yes
smtpd_hard_error_limit = 12
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
smtpd_recipient_limit = 16
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit smtpd_data_restrictions = reject_unauth_pipelining
smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
smtpd_soft_error_limit = 3
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:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
virtual_gid_maps = mysql:/etc/postfix/mysql_gid.cf
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
virtual_uid_maps = mysql:/etc/postfix/mysql_uid.cf
 
Old 08-09-2008, 04:58 PM   #6
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
What is your entry in main.cf for mydestination?

A simple postfix reload should be all you need (sometimes restart)

COmment out all the virtual stuff until the basics are working - it could cause conflicts
 
Old 08-09-2008, 07:38 PM   #7
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Don't use mydom.org, or any real top level domain; you don't own it, and should not usurp an existing domain. Use a non-existent TLD such as .local (eg. myfakedom.local).

See post 41 at this link:

http://www.linuxquestions.org/questi...ml#post3239182

for how to setup a fake (fantasy) name.

Once you have that working, you will setup a generics table to map from the fake name to a real email address:

http://www.postfix.org/SOHO_README.html#fantasy
 
  


Reply

Tags
install, mailserver, postfix


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
Need Help on configuring postfix+dovecot+gmail kustomjs Linux - Server 5 07-02-2008 03:38 PM
Configuring postfix to work on a LAN zulu8300 Linux - Software 4 06-22-2004 02:42 PM
configuring postfix 2 markus1982 Linux - Networking 0 05-25-2003 05:05 AM
help configuring postfix importboy03 Linux - Software 1 05-01-2003 12:45 AM
Configuring Postfix on Mdk 8.1 JimKyle Linux - General 0 01-16-2002 09:06 AM


All times are GMT -5. The time now is 01:08 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