email aliases only partly working

Hello,

I followed Linode's email tutorial precisely, and my email addresses work perfectly. My aliases, however, are giving odd results.

If I have alias@example.com going to myemail@example.com, and send an email from myemail@example.com to alias@, Nothing ever happens. Nothing shows up. However, If I send it from gmail, it fowards to myemail@example.com instantly.

If I send from a different email address, otheremail@3rdparty.com, to alias@example.com, I get an immediate Mail delivery failed: returning message to sender:

The following address(es) failed:

alias@example.com

No Such User Here

So that seems very odd. It works, bounces or goes nowhere depending on the sending email. I can even set up an alias that goes from test@example.com to otheremail@3rdparty.com and it will forward fine –- if it comes from gmail. Otherwise it won't work.

Furthermore, if I change the destination to be gmail, it never goes through. So what's going on here? How to I get this to forward consistently?

Thanks.

5 Replies

What do your mail logs say when you try to send/receive these messages?

Hi, thanks for the reply. There are no errors I can see. When the emails go through, they show up in /var/log/mail.log. When they bounce or disappear, there is no record in the logs. So it seems that in these cases the emails aren't even getting to the system.

I figured out the problem. I moved this domain from my old hosting company, and was using their mail server to send the mail. it thought the domain was still on its server and was attempting to deliver the emails locally. Mystery solved, thank you.

I do have a separate question, though: how do you set up an alias to go to multiple recipients? If I create multiple entries for the destination, delimited by commas, the email will only go to the last address in the field.

Hmm, I don't have experience using MySQL tables for aliases. For Berkeley DB hashes, having multiple addresses separated by commas works fine. The documentation indicates that this is the appropriate format no matter how the table is stored.

It could be that your address syntax is incorrect.

Another possibility is that MySQL tables operate differently. I notice that the MySQL query is capable of returning multiple results. You could try putting an extra entry into the table with the same alias but a different destination. If you were starting from scratch, something like this:

INSERT INTO `mailserver`.`virtual_aliases`
  (`id`, `domain_id`, `source`, `destination`)
VALUES
  ('1', '1', 'alias@example.com', 'email1@example.com'),
  ('2', '1', 'alias@example.com', 'email2@example.com');

This way, the query for 'alias@example.com' would return two results. But this is pure speculation.

Thanks, I think some of my destination emais have problems of their own and this is why the aliases weren't going through. I tried some different ones, and separating them with commas did actually do the trick.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct