Both cases are possible, but manual configuration is needed.
e.g. the latter case:
account in mail program:
SMTP server: 127.0.0.1
SMTP port: 25
avast4.ini, section [MailScanner]:
DefaultSmtpServer=127.0.0.1:7362
mail account in MSGTAG:
SMTP server: smtp.company.com ← replace by your SMTP server
SMTP port: 25
SMTP listen port: 7362