View Single Post

  #2 (permalink)  
Old 08-17-2003
Bit Twister
 
Posts: n/a
Default Re: Postfix - Help on configuration

On Sun, 17 Aug 2003 00:47:07 -0400, Jean-Louis Vill wrote:
> Hi everybody,
>
> I want configure Postfix on my server. I already installed, but if I
> want test it by sending a mail to myself. It not working.


Looking at your errors I would try using the MD software manager to
uninstall postfix and install postfix because of the alias.db error
and to have a clean starting point.

Also allows you to make copies of the original files to compare
against and allows you to see what changes you made to what file.
Your call on the clean install suggestion..

Maybe you can use postmap to make aliases.db or maybe just a link problem.

ls -al /etc/aliases
lrwxrwxrwx 1 root root /etc/aliases -> /etc/alternatives/mta-etc_aliases

ls -al /etc/alternatives/mta-etc_aliases
lrwxrwxrwx 1 root root /etc/alternatives/mta-etc_aliases ->
/etc/postfix/aliases


To get mine to work I made just a few changes and added one line to
main.cf and alias to send my email through my isp.

Downside is messages to root are rerouted to bittwister in aliases.
Then sender_canonical maps messages from bittwister to my isp
email address and I see it when I check my isp email.

Here is a difference listing of main.cf to show my changes
diff legend:
lines with > is the before change. line
lines with < is the after change. line
lines with numbers contain the line and character location of changes.



diff -bBw main.cf main.cf_orig
68d67
< myhostname = wb.home
77d75
< mydomain = home
306c304
< relayhost = smtp.comcast.net
---
> #relayhost = gateway.my.domain

348d345
< sender_canonical_maps = hash:/etc/postfix/sender_canonical

---------------------------------------------
sender_canonical_maps is used to convert my LAN login to my ISP
email name because some MTAs check with my relayhost to verify
the Return-Path email account is valid.

cat sender_canonical
bittwister my_email_addy@comcast.net

---------------------------------------------
diff -bBw aliases aliases_orig
80,81c80
< root: bittwister
<
---
> root: postfix


If you change aliases you need to create the aliases.db with postmap
Same with sender_canonical_maps

After I change anything I do a
postfix stop
cp /dev/null /var/log/mail/errors
cp /dev/null /var/log/mail/info
cp /dev/null /var/log/mail/warnings
cp /etc/resolv.conf /var/spool/postfix/etc/resolv.conf
postfix start

and check the /var/log/mail/* logs

The cp /var/spool/postfix/etc/resolv.conf is because I am on dhcp
from my isp and the spool copy needs to match the /etc copy.

You might find some help in the debug file found with
locate -i postfix | grep -i doc | grep -i debug

You then cut/paste something like
/usr/share/doc/postfix-2.0.6/README_FILES/DEBUG_README
into your browser.

Reply With Quote