Skip to main content
Holy
New Member
Mar 26, 2020 4:45 PM UTC
Solved

Migration from Postfix to FortiMail (Gateway mode)

Hello Guys,

 

what would be a best practice to migrate Email Domains from other MailServers oder Email Security Gateways to FortiMail? i do have CSV from Postfix with 100 DOmains and want to somehow do a script that will create this domains on FortiMail and assign predefined Profiles. is that possible? or do we have to use somehof FortiMail API? Is there any guide for that or some recommendations? i see that i cannot upload scripts to FortiMail Can i use Putty > Connect to FortiMail and do Scripts directly via Putty? would appreciate your advice Thank you

Carl_Windsor_FTNT
Staff
Apr 16, 2020 8:50 AM UTC

Holy wrote:

i want to do smtptests via cli for 40 Email Servers, so it should be somehow automated.

Any idea or a solution how to solve that?

 

SWAKS- Swiss Army Knife for SMTP is your friend here.  You can script mails from outside using something like:

 

swaks -f test@gmail.com -t <email address on protected domain> -s <FML IP>  --body "Test text" --header-Content-Type "text/html" --header-Subject "Test ProtectedDomain"

 

 

 

8 replies

abelio
SuperUser
SuperUser
Mar 27, 2020 2:46 AM UTC

Hi

https://cookbook.fortinet.com/migrating-email-from-other-mail-servers/index.html

 

after you have user accounts in place, you can use imap to migrate mailboxes content to fortimail.

 

Surely you use some scripting in order to accelerate the whole process

AFAIK, there's no available Rest API methods for massive number of domains.

 

If all domains could share similar policies, you could define it as associate domains in order to save some time

 

 

 

Translate
Holy
HolyAuthor
New Member
Mar 27, 2020 7:21 AM UTC

Hello abelio,

 

i saw this coockbook of couse, but this is for server mode.

 

i actualy just need a way to automate the migration process to Gateway mode with massive number of domains.

 

As there is no direct possibility to upload scripts to FortiMail a Script that connects via ssh should work too right?

 

is there a possiblity to check wheter the script execution sucseeded? on the FortiGate you can check error log for example.

 

Thank you

 

Translate
abelio
SuperUser
SuperUser
Mar 27, 2020 2:34 PM UTC

Hello,

Sorry, I didn't see 'gateway mode'

 

I guess that it should be easier than server mode,  because you don't need to deal  at first instance with users stuff.

(I said 'easier than' and not 'simple') 

I agree with you a lack of support for direct scripting so useful within fortigate world.

 

In your shoes, I'll explore two (non-exclusive) approaches:

- Fortimail REST API 6.2  now includes HTTP PUT methods for /domain

- ask your local SE  to confirm that we're in the right track

 

 Please, share here with us if you can solve this problem, it's very interesting and challenging

 

 

 

Translate
Risk and Resilience in the Age of AI. An OT Thought Leadership Summit for Houston's Critical Infrastructure Leaders. Date: Thursday, December 3, 2026. Time: 8:30 am - 1:30 pm (CT). Location: The Westin Houston, Memorial City | 945 Gessner Road, Houston, TX 77024