Default email account created with accounts (why is necessary to create one?)

albatroz

Verified User
Joined
Mar 13, 2004
Messages
365
Location
Peru
I guess that although it is a legacy practice, it is a bad idea, as it can
be easily filled with spam.
Plesk, for instance does not have this "feature" ...
 
Interesting point. It exists because it's the focal point of all the errors the server would send. And for people who need only one email address, it's convenient.

Not to mention that it's built in to linux/unix and doesn't require code, whereas not creating it would.

Not creating it is impossible, because by definition, a user is a user and a user can receive email.

What can be done is a change to the exim.conf file to not allow the email to be received.

If enough people want this I suppose it can become an option in SpamBlocker, but then how would users get important emails from the server?

Jeff
 
To add another issue ... RFCs require all domains that send email have both a postmaster and an abuse. Most users don't bother. I'd suggest that rather than not have a user email account, I'd use it as a target for forwards from both postmaster and abuse. In fact, on our accounts, we do, and then we set a forward for the user account to an account we read.

Jeff
 
I do as you suggested Jeff. I have a script that runs each time a new domain is added to automatically create the postmaster, abuse, and webmaster email addresses and then those emails get forwarded to the user's main system email account. Whenever I set the account up for a user, I ask if the system email should be sent to an account that they check frequently or whether it should be a separate account. If the account is separate, there's nothing to do, they just check the main DirectAdmin email account. But, if they want all system emails to be forwarded to another account, I just create a .forward file in the user's home directory that has the email address that all messages should be sent to. This seems to work great for me and my customers.
 
Mmm..

in lxadmin panel when create an account, is created automatically postmaster email account, but in panel is possible converted this account email to email forward.

I suggest this implementation for DA ;)
 
Last edited:
Hmm.. I see conflicting issues though.
1) Yes, domains are supposed to have them according to RFCs
2) but that means that they're very easy targets for spammers.

The system account is at least not consistent, so spammers have to guess in order to get mail to it, but "postmaster" and "abuse" will be the same for all domans, so spammers would only have to send email there and your account gets filled up.

There isn't 1 good solution for all cases here, unless I'm missing something.

John
 
Yes.. ok for all,

but for example, if I use DA panel in VPS or server and install 10 domain only for me, have 10 default email :eek:

it would be better to create 10 forward :)
 
If you create all the domains under the one user then there is really only one default email which is the username. Mail for the username@ each of your domains goes into the one default email box.
 
Yes ok,

but for some uses, I prefer create certain domain with one user (backups, ssh and other).

Ok thanks for all, I have proposed, if there is want to do, ok... if no peace ;)
 
You can forward the default email account to another email address.

Your system, one account with multiple domain is not possible, if the domain is on different server or vps

I don't know what that statement has to do with this thread about email.
 
You can forward the default email account to another email address. I don't know what that statement has to do with this thread about email.

Simply, I ask if it were possible change the default email in forward email,
and if you could insert a function in DA ;)
 
All users on a unix type system can receive email. That cannot be changed.

You can however have DirectAdmin automatically create a Forward for that email account to another email address every time you add a domain to that users account using the custom scripts function (search the forum for custom scripts).

You can also add the forward to /etc/aliases and then you won't have to do it for each domain. Everything sent to a user will get forwarded.
 
Hmm.. I see conflicting issues though.
1) Yes, domains are supposed to have them according to RFCs
2) but that means that they're very easy targets for spammers.
abuse and postmaster addresses are both important; if you ever host a client who either accidentally or intentionally gets labeled as a spammer and email to his or your hostname's abuse and/or postmaster accounts bounce you'll find yourself on some anti-spam blocklists that are extremely hard to get off of.

And in fact we hardly ever see spam to either postmaster or abuse addresses. If we do, we add the servers to our local blocklists rather quickly.
The system account is at least not consistent, so spammers have to guess in order to get mail to it, but "postmaster" and "abuse" will be the same for all domans, so spammers would only have to send email there and your account gets filled up.
Because it's inconsistent spammers won't mail to it. Neither will recipients complaining about spammers. And that's the problem.

Personally I don't care how it's implemented; But I think that for ease of setup leave the user account email address (as I noted previously it's not especially easy to get rid of it) and automatically create abuse and postmaster forwarders to it at account creation time.

Anyone who wants the system user email forwarded anywhere can just create a forwarder for it. Remember that unlike forwarders for virtual email boxes, where email ends up in both the email box and the forward, creating a forward for a system account means no email will end up in the system user email box.

Perhaps resellers should customize their welcome emails; we do.

Jeff
 
Hello,

If anyone wants it, a way to do that now is create:

/usr/local/directadmin/scripts/custom/domain_create_post.sh

in it, put the following code, then chmod it to 755:
Code:
#!/bin/sh
echo "postmaster: $username" >> /etc/virtual/$domain/aliases
echo "abuse: $username" >> /etc/virtual/$domain/aliases
exit 0;
John
 
John,

I've been adding forwarders to my domains when they are created with the following code:

Code:
#!/bin/sh
 
#Create default mail aliases for the domain
FILE=/etc/virtual/$domain/aliases
mv $FILE $FILE.tmp
echo "abuse: $username" > $FILE
echo "admin: $username" >> $FILE
echo "postmaster: $username" >> $FILE
echo "webmaster: $username" >> $FILE
cat $FILE.tmp >> $FILE
rm -f $FILE.tmp
chown mail:mail $FILE
chmod 600 $FILE

Is it not necessary to do all of this and just use the code that you provided above?
 
Appending is fairly safe for live inserts. The same permissions and ownership is kept and the old data is never removed (assuming you use >> and not >). The new data is simply tagged onto the end of the file on disk, the original data should remain untouched on disk.. even an append failure won't hurt the original data.

The method you've got has the potential of wiping out all the info if the disk is full, for example.

I don't think the * has to be at the bottom, based on the very quick test I did.. (possilbly more thorough tests would be good)

John
 
Back
Top