Re: Postfix error question
From: Ryan Knopp (ryanrk_at_NO_SPAM_PLEASEtheknopps.com)
Date: 02/05/04
- Next message: Cybe R. Wizard: "Re: Linux Desktop a reality?"
- Previous message: Dave: "Re: LDAP newsgroup"
- In reply to: Bit Twister: "Re: Postfix error question"
- Next in thread: Molchun: "Re: Postfix error question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 04 Feb 2004 19:40:22 -0800
Bit Twister wrote:
> On Wed, 4 Feb 2004 16:18:47 -0800, Ryan Knopp wrote:
>
>>I setup postfix main.cf and stuff and now when I send an email to my
>>account I get the following error message in my inbox.
>>
>>
>>>>Name service error for name=localhost type=A: Host not found>>
>>>>127.0.0.1 localhost
>>>>192.168.0.101 localhost
>>
>>Any ideas
>
>
> Please read http://www.catb.org/~esr/faqs/smart-questions.html
> It always helps to provide which distrigution and release when you post
> questions. It helps us give better answers.
>
> I would change the hostname, you know something catchy like darkstar.
>
> You can find hostname configuration files with this command
> find /etc -type f -name "*" -print | xargs grep -I $(hostname)
>
> For Redhat/Makdrake here are snippets from some of my Mandrake files
> which set hostname, ip address, or used in resolving/setting
> hostnames/ip addresses.
>
>
> cat /etc/sysconfig/network
> NETWORKING=yes
> HOSTNAME=wb.home.invalid <==============
> GATEWAY=12.209.206.1
> GATEWAYDEV=eth0
>
> cat /etc/hosts
> 127.0.0.1 localhost.localdomain localhost
> 192.168.1.10 wb.home.invalid wb <==============
>
>
> Anytime you change the host name, logout of the desktop manager and do a
> source /etc/sysconfig/network
> hostname $(HOSTNAME)
> uname -n
> service network restart
> That will test what hostname will be on next boot.
>
> Next two files are used during host/ip resolution
> cat /etc/host.conf
> order hosts,bind
> multi on
>
> grep hosts: /etc/nsswitch.conf
> hosts: files nisplus nis dns
>
> grep myhostname /etc/postfix/main.cf
> myhostname = wb.home.invalid <==============
>
>
> If you changed /etc/hosts and using postfix
> cp /etc/hosts /var/spool/postfix/etc/hosts
> or changed /etc/postfix/main.cf
> service postfix restart
>
> You need to setup your MTA anyway to get messages from cron jobs.
>
> You can find the postfix documentation with the command
> locate doc/postfix | grep index.htm
> cut/paste something like
> /usr/share/doc/postfix-2.0.13/html/index.html
> into your browser.
>
> Before I modify a file for the first time, I copy it to same_name_orig
> man diff for more information.
>
> 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.
>
>
> I setup postfix so that root email is routed to my user account.
>
> I modified aliases to send root's email to bittwister:
>
> cd /etc/postfix
>
> diff aliases_orig aliases
> 80c80,81
> < root: postfix
> ---
>
>>root: bittwister
>
>
> I generated the aliases.db with postalias aliases
>
> More and more postmasters are rejecting email if they can not verify
> that the Return-Path contains a valid email account in a registered domain.
> All mail sent from bittwister appears to come from my ISP email account.
>
> I modified canonical with the following line
> bittwister my_email_addy@attbi.com
>
> I generated the hashed canonical.db with the command
> postmap canonical
>
> I modified main.cf with my isp/local host.domain
> and added the sender_canonical_map line.
>
> diff main.cf_orig main.cf
> 68a69
>
>>myhostname = wb.home.invalid
>
> 75a77
>
>>mydomain = home.invalid
>
> 306a309
>
>>relayhost = smtp.comcast.net
>
> 378c381
> < alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
> ---
>
>>#alias_maps = hash:/etc/postfix/aliases, hash:/var/lib/mailman/data/aliases
>
> 380a384
>
>>alias_maps = hash:/etc/postfix/aliases
>
>
> You need to hash all the database files to create the following:
> ls -1 *.db
> access.db
> aliases.db
> canonical.db
> relocated.db
> transport.db
> virtual.db
>
> if you do not have a .db file do a
> postmap filename_without_dot_db
> for the above.
>
> example:
> postmap access
> postmap canonical
> postmap relocated
> postmap transport
> postmap virtual
>
>
> After I change anything I do a
> postfix stop # may not be running
> 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 for errors.
>
> 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.
>
> Other docs found at
> http://www.mandrakeuser.org/docs/connect/index.html#mtuw
>
>
> You can test with
> mail -s "subject string" whoever@wherever < /dev/null
Thanks a lot! Your message and that link to mandrakeuser.org helped a
lot. I figured out it was my hosts file in /etc/hosts. So now it
recieves email just fine, however I have another small issue. If I do a
raw smtp message from a telnet program using the SMTP protocol commands
the mail sends ok. When I go into the console and type mail it's not in
my mailbox but if I go and type mailq it shows it in the queue without any
errors being present.
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
2BFBB1F082 349 Wed Feb 4 19:35:28 ryan@thedomain.com
ryan@thedomain.com
-- 0 Kbytes in 1 Request.
I tried getting the mail using POP3 but it doesn't download into my mail
program. It logins in ok but says there isn't any messages. I notice the
queue_directory is located at /var/spool/postfix and I have a file with my
account name on it. Am i missing something somewhere? I'm using SUSE 9.0
with the postfix RPM.
Thanks
Ryan
- Next message: Cybe R. Wizard: "Re: Linux Desktop a reality?"
- Previous message: Dave: "Re: LDAP newsgroup"
- In reply to: Bit Twister: "Re: Postfix error question"
- Next in thread: Molchun: "Re: Postfix error question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|