Mail aliases: Importing & Changing 'From' Address

Hi,

We’re looking at setting up a small server primarily for the purposes of email forwarding for a domain and thought that Virtualmin would work well for this (albeit a bit overkill).

We’ve used Virtualmin for a while and have used Mail Aliases for basis uses, however we have a few questions that we haven’t been able to find answers to easily:

  1. A single domain will likely have over 200 mail aliases. Is there any issue with having this many, and is there any way of importing them in bulk, not necessarily using the UI?

  2. Are we able to change the ‘From’ name and address on the email when it’s forwarded? We’d like to us a noreply@… address to prevent it being able to be replied directly to.

Many thanks,

Adam

Howdy,

It’s no problem to have 200 aliases.

Where are you looking to import them from? Where are they stored now? Or are you just asking, what’s the fastest way to add many aliases?

Also, it’s no problem to change the “From” name, though that’s generally something done in the email client being used. As long as your email client supports a configurable “from” name, that’ll work fine.

-Eric

Hi Eric,

Thanks for your prompt response.

Sorry, I should have been clearer. We’re not importing them from anywhere specifically, they’ll possibly just be in a spreadsheet. We’re just wondering if we can bulk import them through the UI, or ever run a database query to import them all. Anything to save having to add 200+ manually.

Regarding the forward, I might need to clarify what I meant. We’re looking to achieve the following:

An alias is setup to forward emails for ‘name@domain1.com’ to ‘name@domain2.com’, however the email that ‘name@domain2.com’ receives should be from ‘noreply@domain3.com’.

Is that possible?

Thanks,

Adam

We’re just wondering if we can bulk import them through the UI, or ever run a database query to import them all. Anything to save having to add 200+ manually.

Will these all be aliases pointing to the same account?

If so, you can go into Edit Users -> Email settings, and there you’ll see a big textarea box that you can use titled “Additional email addresses”, where you could copy and paste a large batch of aliases in.

Will that do what you’re after?

however the email that ‘name@domain2.com’ receives should be from ‘noreply@domain3.com’.

The mail system just delivers mail exactly as is – in order for it to use an address like you’re describing, that would need to be either the “From” or “Reply-To” address of the email that goes out.

Then, when someone responds to it, the desired address would be part of the “To” field.

To set that as the From or Reply-To address, that would be a setting in the email software that’s sending the email.

-Eric

Will these all be aliases pointing to the same account?

I’m afraid not. They’re all unique email addresses going to unique destinations.

Are we able to add them to the database directly? If we can do this we’ll convert a CSV file to an INSERT statement.

The mail system just delivers mail exactly as is

I thought this would be the case. Unfortunately we don’t control where the emails are being sent from, so I don’t think this will be possible.

We managed to achieve what we needed regarding import by using the ‘Manually edit aliases’ page.