LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-05-2008, 02:22 AM   #31
madfed
Member
 
Registered: Jul 2008
Location: Kampala Uganda
Distribution: Fedora 7& SUSE 11.0
Posts: 48

Original Poster
Rep: Reputation: 15

checkmate3001, thanx so much for the links and postfix guide. Now about the postfix book do u hav a soft copy or printed one?
 
Old 08-05-2008, 02:24 AM   #32
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Postfix adds myorigin (which defaults to myhostname) onto email addresses that are unqualified (eg. nelly gets rewritten as root@nelly.mail1.local). So this matches what you see in test1. And test3 ends up being the same as test1 because of this.

test2 fails, because the domain "mail1.local" does not match myorigin (which above we set is set to the default nelly.mail1.local).

If you want the domain "mail1.local" to be the domain used, set myorigin:

myorigin = $mydomain

Please show exactly the log lines, or mail headers that reference "suse.de".
 
Old 08-05-2008, 02:25 AM   #33
madfed
Member
 
Registered: Jul 2008
Location: Kampala Uganda
Distribution: Fedora 7& SUSE 11.0
Posts: 48

Original Poster
Rep: Reputation: 15
my hostname is nelly, and my /etc/hosts file looks like this;

Quote:
nelly:/ # cat /etc/hosts
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts
127.0.0.2 nelly.mail1.local nelly
192.168.43.6 nelly.mail1.com nelly
Thnx
 
Old 08-05-2008, 02:36 AM   #34
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
You need to add nelly.local in there, so

27.0.0.2 nelly.mail1.local nelly.local nelly
192.168.43.6 nelly.mail1.com nelly.local nelly
 
Old 08-05-2008, 02:40 AM   #35
madfed
Member
 
Registered: Jul 2008
Location: Kampala Uganda
Distribution: Fedora 7& SUSE 11.0
Posts: 48

Original Poster
Rep: Reputation: 15
Hi, here is a cut out from the log generated when i logged in as nelly and sent mail to editorial@nelly.mail1.local
Quote:
Aug 5 10:27:00 nelly postfix/smtpd[11704]: 5C35E1A3334: client=localhost[127.0.0.1]
Aug 5 10:27:00 nelly postfix/cleanup[11707]: 5C35E1A3334: message-id=<60767.192.168.43.172.1217921220.squirrel@192.168.43.6>
Aug 5 10:27:00 nelly postfix/qmgr[11681]: 5C35E1A3334: from=<nelly@suse.de>, size=717, nrcpt=1 (queue active)
Aug 5 10:27:00 nelly postfix/smtpd[11704]: disconnect from localhost[127.0.0.1]
Aug 5 10:27:00 nelly postfix/local[11741]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Aug 5 10:27:00 nelly dovecot: imap-login: Login: user=<nelly>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured
Aug 5 10:27:00 nelly postfix/local[11741]: 5C35E1A3334: to=<editorial@nelly.mail1.local>, relay=local, delay=0.19, delays=0.1/0.01/0/0.08, dsn=2.0.0, status=sent (delivered to mailbox)
Do u notice the 'from' it says nelly@suse.de
 
Old 08-05-2008, 02:40 AM   #36
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Postfix doesn't use the hosts file unless disable_dns_lookups = yes..
 
Old 08-05-2008, 02:46 AM   #37
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
Quote:
Originally Posted by Mr. C. View Post
Postfix doesn't use the hosts file unless disable_dns_lookups = yes..
But it can't resolve it to send to it either
 
Old 08-05-2008, 02:47 AM   #38
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
How are you sending the mail? What MUA are you using? The from=<nelly@suse.de> is the Envelope Sender. This is set by your MUA when you send the mail to your server.
 
Old 08-06-2008, 07:34 AM   #39
madfed
Member
 
Registered: Jul 2008
Location: Kampala Uganda
Distribution: Fedora 7& SUSE 11.0
Posts: 48

Original Poster
Rep: Reputation: 15
Hi guys,
I really really appreciate all the efforts you have invested in this and it really means alot to me, i now think i had a problem with the domain and hostname configs, coz right now i can send and receive mail locally, but i guess if i get a fully qualified domain name everything will be fine. i applied for one from my ISP and its in the process.
Anyways thank you very much and im totally grateful.

B.T.W
Can u guys show me how to increase the attachments maximum size? coz right now its at 2MB, i would really like to put at around 15MB,
Also lets say i need to send email to all users on the server without typing all of them one by one, that means i need to create some sort of aliases, how do i go about that? lets say i need it to be like staff@nelly.mail1.local, i need help on this.
Thnx n Rgds.
 
Old 08-06-2008, 04:11 PM   #40
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
There's a parameter for main.cf call message_size_limit. Set this to the number of bytes you'd like to allow.

Quote:
message_size_limit (default: 10240000)

The maximal size in bytes of a message, including envelope information.

Note: be careful when making changes. Excessively small values will result in the loss of non-delivery notifications, when a bounce message size exceeds the local or remote MTA's message size limit.
 
Old 08-06-2008, 05:31 PM   #41
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
madfed,

Postfix can use a phony domain name - a real domain name is not even necessary to send mail outbound, but you have to rewrite the envelope sender. This is all documented in the Small Home and Office README on the postfix site (I think I referred you to that site).

Unless you are also able to get a PTR DNS (aka: reverse DNS) name, you will have trouble sending to other MTAs. If you are on a residential or dynamic IP, you will have trouble sending to other MTAs.

Quote:
Originally Posted by billymayday
But it can't resolve it to send to it either
I think you are misunderstanding how this works. Postfix can mail just fine without an entry in /etc/hosts:

Code:
$ cat /etc/hosts
127.0.0.1       localhost
127.0.1.1       lappy

$ postconf mydomain myhostname myorigin mydestination
mydomain = mydomain.local
myhostname = mail.mydomain.local
myorigin = mydomain.local
mydestination = $mydomain, localhost.localdomain, localhost

$ echo Hello | mail -s "A subby" mrc

$ cat /var/log/main.log
Aug  6 15:27:13 lappy postfix/pickup[8465]: D8198C8238: uid=0 from=<root>
Aug  6 15:27:13 lappy postfix/cleanup[8474]: D8198C8238: message-id=<20080806222713.D8198C8238@mail.mydomain.local>
Aug  6 15:27:13 lappy postfix/qmgr[8466]: D8198C8238: from=<root@mydomain.local>, size=310, nrcpt=1 (queue active)
Aug  6 15:27:13 lappy postfix/local[8476]: D8198C8238: to=<mrc@mydomain.local>, orig_to=<mrc>, relay=local, delay=0.06, delays=0.04/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)
Aug  6 15:27:13 lappy postfix/qmgr[8466]: D8198C8238: removed
 
Old 08-06-2008, 05:36 PM   #42
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Quote:
Originally Posted by madfed View Post
Also lets say i need to send email to all users on the server without typing all of them one by one, that means i need to create some sort of aliases, how do i go about that? lets say i need it to be like staff@nelly.mail1.local, i need help on this.
Thnx n Rgds.
If they are local users, add an alias to the aliases file. To find its location,

$ postconf -d alias_database
alias_database = hash:/etc/aliases

and then add

staff: email1, email2, email3, ...

then run

newaliases
 
Old 08-06-2008, 05:37 PM   #43
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
So are you saying that Postfix doesn't bother resolving hostnames in mydestinations (which would make sense)? Otherwise they need to be resolved somewhere, ang this name won't be in any dns server.
 
Old 08-06-2008, 05:50 PM   #44
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Exactly.

man 5 postconf:
Quote:
mydestination (default: $myhostname, localhost.$mydomain, localhost)
The list of domains that are delivered via the $local_transport mail
delivery transport. By default this is the Postfix local(8) delivery
...
Postfix checks the recipient domain against mydestination; if it matches, its a local delivery, so no need to lookup any hostnames.
 
Old 08-06-2008, 06:14 PM   #45
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
Fair 'nuff, and good to add a little something to the knowledge base
 
  


Reply



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 : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
postfix can't receive mail; send OK ssfrstlstnm Linux - Server 4 04-24-2007 08:01 PM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 07:31 PM
Postfix able to send but not receive mail :( !! Ikik Linux - General 10 01-28-2004 07:40 PM

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

All times are GMT -5. The time now is 09:06 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
Open Source Consulting | Domain Registration