LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Postfix + imap without mysql (https://www.linuxquestions.org/questions/linux-server-73/postfix-imap-without-mysql-646894/)

CoolCow 06-04-2008 03:51 AM

Postfix + imap without mysql
 
Hello,

I'm having troubles configuring postfix with imap support.
I've used this tutorial to install postfix with imap.
But now i'm wondering if i can create users without using mysql for storing the accounts.
I only need 3 users and postfix should run as fast as possible, that's why i don't want to use mysql.

Is this possible, or is mysql required once imap is used?

billymayday 06-04-2008 04:33 AM

Where does the tutorial even mention mysql?

Postfix by default will pick up unix style users from /etc/passwd, so add those users using useradd and their mail should appear in /home/their_username/Maildir.

fyi, mysql isn't a default option as far as I recall, and the RH packages don't come with it in any case. here's a snippet from the postfix site on making with mysql support

Code:

make -f Makefile.init makefiles \
    'CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include' \
    'AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm'


CoolCow 06-04-2008 05:12 AM

I'm sorry, i mixed up the tuts i used, it was this one.

Now i already created the users when i first started postfix without courier imap (as discribed in another tut) but that doesn't seem to work.

When i try to telnet imap i get this:
Code:

# telnet localhost imap
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE
THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision,
Inc.  See COPYING for distribution information.
X login mailer ***masked***
* BYE [ALERT] Fatal error: Maildir: No such file or directory
Connection closed by foreign host.

So there's still something wrong with the users.
And when i look at /home/mailer there is no Maildir directory...

billymayday 06-04-2008 05:15 AM

Create

~/Maildir
~/Maildir/cur
~/Maildir/new
~/Maildir/tmp

where ~ = /home/relevant_username

all owned by the user and permissions 700

CoolCow 06-04-2008 06:46 AM

Quote:

Originally Posted by billymayday (Post 3174288)
Create

~/Maildir
~/Maildir/cur
~/Maildir/new
~/Maildir/tmp

where ~ = /home/relevant_username

all owned by the user and permissions 700

Thnx, that did the trick, must of missed something in the tut.

Another postfix related question.
I'm using imap with php. When i login using the imap_open function in php i must provide the /notls option.
Is is possible to disable ssl/tls by default?

billymayday 06-04-2008 06:53 AM

Probably, but I use dovecot not courier-imap, so I can't help you there

CoolCow 06-05-2008 03:27 AM

One last thing :p

Postfix is running perfectly but there's one configuration problem i can't seem to find.

Using SMTP i only want postfix to allow e-mails being sent from localhost and/or a certain domain.
I've tried enabling smtpd_reject_unlisted_sender but i still can send from any domain.

e.g.: the MAIL FROM: should only allow <variable>@my-domain.com


All times are GMT -5. The time now is 06:36 AM.