PDA

View Full Version : how to create new email account?


intars
2nd October 2005, 18:01
Hello!
I have suse9.3, postfix. I create new user with home directory /var/spool/mail but I got following error:

Log In Error: Access denied: Your account is temporarily unavailable (+t bit set on home directory).
I have not ISPConfig.

What is an error?

falko
2nd October 2005, 20:54
When do you get the error? When logging in with POP3?
Can you post
ls -l /var/spool/mail<username>
and
ls -l /homedir/of/<username>?

intars
2nd October 2005, 22:07
When do you get the error? When logging in with POP3?
Can you post
ls -l /var/spool/mail<username>
and
ls -l /homedir/of/<username>?
Yes. with POP3 and telnet too!
:confused:I want to just set up new user email account. How to do this in Suse 9.3?

falko
2nd October 2005, 23:38
Ok, but can you post the output of
ls -l /var/spool/mail/<username>
and
ls -l /homedir/of/<username>
here?

intars
3rd October 2005, 09:30
suse:/ # ls -l /var/spool/mail/intars
/bin/ls: /var/spool/mail/intars: No such file or directory
and
suse:/ # ls -l /var/spool/mail/intars
/bin/ls: /var/spool/mail/intars: No such file or directory

How can I create these files???

falko
3rd October 2005, 14:22
suse:/ # ls -l /var/spool/mail/intars
/bin/ls: /var/spool/mail/intars: No such file or directory
and
suse:/ # ls -l /var/spool/mail/intars
/bin/ls: /var/spool/mail/intars: No such file or directory

How can I create these files???
Do you use Maildir or mbox? Which POP3 daemon do you use? Did you follow any of the howtos to set up your server? If so, which one?

intars
3rd October 2005, 23:07
Do you use Maildir or mbox? Which POP3 daemon do you use? Did you follow any of the howtos to set up your server? If so, which one?

I am Linux beginner user. I installed Suse9.3 after The Perfect Setup - SUSE 9.3 Version 1.0 guide. Author: Falko Timme <ft@falkotimme.com>.
The thing is that I do not use ISPConfig, Proftpd, Webalizer, netdate and have not Installed Perl Modules.
Via root shell using #telnet localhost 25,#mail from: <xxx@xx.xx> and
#rcpt to: <yyy@yy.yy> really sends the message and the adresee receives it. I do not know, what is Maildir and mbox. That is why I cannot tell what exactly do I use.
As far as I understand the problem is with users mail directory or some alias files locatins - or I just do not know how to create a new user.

falko
4th October 2005, 00:11
If you have followed the Perfect Setup guide for SuSE 9.3 then you have also installed Courier, as described here: http://www.howtoforge.com/perfect_setup_suse_9.3_p5, right?
Did you also do these steps?
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart

intars
4th October 2005, 08:52
If you have followed the Perfect Setup guide for SuSE 9.3 then you have also installed Courier, as described here: http://www.howtoforge.com/perfect_setup_suse_9.3_p5, right?
Did you also do these steps?
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart

Yes, I followed these guide, and this code too! :o

intars
4th October 2005, 10:38
Yes, I followed these guide, and this code too! :o

suse:~ # telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user intars
+OK Password required.
pass xxxx
-ERR Maildir: No such file or directory
Connection closed by foreign host.

User <intars> I create in installation process.

I found in /var/log/mail.warn these err:
Oct 4 09:06:30 suse postfix/smtpd[23753]: warning: connect to private/tlsmgr: No such file or directory
Oct 4 09:06:31 suse postfix/smtpd[23753]: warning: problem talking to server private/tlsmgr: No such file or directory
Oct 4 09:06:31 suse postfix/smtpd[23753]: warning: no entropy for TLS key generation: disabling TLS support
Oct 4 09:08:50 suse postfix/smtp[23757]: warning: connect to private/tlsmgr: No such file or directory

falko
4th October 2005, 10:55
suse:~ # telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user intars
+OK Password required.
pass xxxx
-ERR Maildir: No such file or directory
Connection closed by foreign host.

User <intars> I create in installation process.

Ok, you're using Maildir. The Maildir is created upon the first email that arrives at that account, therefore send a test email to that account, then the error message will disappear.

intars
4th October 2005, 12:32
Ok, you're using Maildir. The Maildir is created upon the first email that arrives at that account, therefore send a test email to that account, then the error message will disappear.

Okay, after #postconf -n I found wrong mydomain, - <myhostname>.<mydomain.ltd>.
How can I change this to mydomain = <mydomain.ltd>?

falko
4th October 2005, 12:51
Okay, after #postconf -n I found wrong mydomain, - <myhostname>.<mydomain.ltd>.
How can I change this to mydomain = <mydomain.ltd>?

By running postconf -e 'mydomain = <mydomain.ltd>' or editing /etc/postfix/main.cf manually. Restart Postfix afterwards.

intars
4th October 2005, 17:05
By running postconf -e 'mydomain = <mydomain.ltd>' or editing /etc/postfix/main.cf manually. Restart Postfix afterwards.
Without success :(

suse:~ # telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 <hostname>.<mydomain.ltd> ESMTP Postfix
mail from: xxx@xxx.xx
250 Ok
rcpt to: yyy@<mydomain.ltd>
250 Ok
data
354 End data with <CR><LF>.<CR><LF>
Test
.
250 Ok: queued as 551E21A7F8
quit
221 Bye
Connection closed by foreign host.
suse:~ # telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user yyy
+OK Password required.
pass lalala
-ERR Maildir: No such file or directory
Connection closed by foreign host.
:( :( :(
suse:~ # postconf -n
alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
home_mailbox = Maildir/
html_directory = /usr/share/doc/packages/postfix/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain
mydomain = <mydomain.ltd>
myhostname = suse.$mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,check_ relay_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
strict_rfc821_envelopes = no
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550

Here all is ok?

falko
4th October 2005, 19:28
If you're sending emails to yyy@mydomain.ltd you have to make sure that mydomain.tld is in mydestination. Currently it isn't!
Then you must have a system user yyy.

If yyy is just an alias, not a system user, you have to run:
postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'

Then create /etc/postfix/virtusertable with the following contents:
yyy@mydomain.ltd system_user_that_should_get_the_email
Whenever you change /etc/postfix/virtusertable, you have to run
postmap /etc/postfix/virtusertable

Don't forget to restart Postfix after your changes.

intars
5th October 2005, 11:48
If you're sending emails to yyy@mydomain.ltd you have to make sure that mydomain.tld is in mydestination. Currently it isn't!
Then you must have a system user yyy.

If yyy is just an alias, not a system user, you have to run:
postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'

Then create /etc/postfix/virtusertable with the following contents:
yyy@mydomain.ltd system_user_that_should_get_the_email
Whenever you change /etc/postfix/virtusertable, you have to run
postmap /etc/postfix/virtusertable

Don't forget to restart Postfix after your changes.

:) :) :)
Now is O.K.!!! It working! :) Thank you!
But now I have another question about apache: why when I write in explorer http://www.<mydomain.ltd> I receive: Access forbidden! Error 403?

falko
5th October 2005, 18:37
But now I have another question about apache: why when I write in explorer http://www.<mydomain.ltd> I receive: Access forbidden! Error 403?

Did you create an index file (e.g. index.html) in the directory that Apache tries to access? If not, do that.

intars
5th October 2005, 22:00
Did you create an index file (e.g. index.html) in the directory that Apache tries to access? If not, do that.
:) Thank You! :)

intars
7th October 2005, 11:39
Did you create an index file (e.g. index.html) in the directory that Apache tries to access? If not, do that.

HI FALKO! I set up UebiMiau(POP3 mail reader) on my mail server(set up byThe Perfect Setup - SUSE 9.3), but when I try to open this mail page, I receive just index.php code! Why??? :confused:

till
7th October 2005, 12:05
Have you installed mod_php in your webserver and enabled it?

intars
7th October 2005, 13:00
Have you installed mod_php in your webserver and enabled it?
Okay. I just install mod_php using comand #apt-get install mod_php. So how to enable it?

till
7th October 2005, 13:08
It should be enabled automatically. I dont think the apt package is named exactly mod_php. Better you search with apt-cache search php.

In Debian 3.0 the package for php4 and apache 1.3 is named: libapache-mod-php4
and for apache 2: libapache2-mod-php4

intars
7th October 2005, 15:44
It should be enabled automatically. I dont think the apt package is named exactly mod_php. Better you search with apt-cache search php.

In Debian 3.0 the package for php4 and apache 1.3 is named: libapache-mod-php4
and for apache 2: libapache2-mod-php4
Yes, I have instaled apache2-mod_php5.

falko
7th October 2005, 16:19
You might have to create symlinks from the directory /etc/apache2/mods-enabled to the php.conf and php.load files in /etc/apache2/mods-available (the symlinks must have the same names as the original files) and restart Apache.
An example on how to do this is on this page: http://www.howtoforge.com/perfect_setup_debian_sarge_p5

intars
9th October 2005, 16:54
You might have to create symlinks from the directory /etc/apache2/mods-enabled to the php.conf and php.load files in /etc/apache2/mods-available (the symlinks must have the same names as the original files) and restart Apache.
An example on how to do this is on this page: http://www.howtoforge.com/perfect_setup_debian_sarge_p5
Hi! I have another problem with email:
why my user for instance user@<mydomain.ltd> can`t send mail using my SMTP server to another user (not to mydomain user)? This my user is not physically in my network. It he is, than everything works fine. He receives error like this:

The message could not be sent because one of the recipients was rejected by the server. The rejected e-mail address was 'auser@<NO_mydomain.ltd>'. Subject 'Test message', Account: '<myhostname>.<mydomain.ltd>', Server: '<myhostname>.<mydomain.ltd>', Protocol: SMTP, Server Response: '554 <auser@<NO_mydomain.ltd>>: Recipient address rejected: Relay access denied', Port: 25, Secure(SSL): No, Server Error: 554, Error Number: 0x800CCC79

till
9th October 2005, 17:07
You have to enable SMTP_Auth in the email client. In most Email clients this feature is named like "SMTP server requires authentication".

intars
9th October 2005, 18:55
You have to enable SMTP_Auth in the email client. In most Email clients this feature is named like "SMTP server requires authentication".
Can I disable this feature?

till
9th October 2005, 19:02
If your server is connected to the internet and you disable SMTP_Auth your server will be an open Relay and will be banned by other mailservers.

If your Server is in a private network, you can change mynetworks = 127.0.0.0/8 in the main.cf to a netmask that allows your complete internal network to relay mails through this server.

intars
9th October 2005, 19:51
If your server is connected to the internet and you disable SMTP_Auth your server will be an open Relay and will be banned by other mailservers.

If your Server is in a private network, you can change mynetworks = 127.0.0.0/8 in the main.cf to a netmask that allows your complete internal network to relay mails through this server.
My mail server is connected to the internet.I need, that my user with adress user@<mydomain.ltd> can send e-mails using my smtp server <myhostname>.<mydomain.ltd> without being in my network and witout any autentification like other mail server users can.

falko
9th October 2005, 22:29
My mail server is connected to the internet.I need, that my user with adress user@<mydomain.ltd> can send e-mails using my smtp server <myhostname>.<mydomain.ltd> without being in my network and witout any autentification like other mail server users can.
But then it would be an open relay...

intars
9th October 2005, 22:46
O.K., It is clear now... Thanks.

intars
11th November 2005, 16:31
Hello Falko!
Now I have one more domain name<domain2.ltd>. I is possible to set up my existing postfix mail server with <domain1.ltd> for this domain too and create new mail users for this new domen e.g. newdom_user@<domain2.ltd>?

Thanks!

falko
11th November 2005, 19:08
Sure, have a look here: http://www.howtoforge.com/forums/showthread.php?t=2 :)