{
MegaBrutal's SMTP Server (MgSMTP)
- Copyright (C) 2010-2014 MegaBrutal
+ Copyright (C) 2010-2015 MegaBrutal
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
ForwardToList: TStringList;
SpoolObject: TSpoolObjectCreator;
OrigSpoolID: string;
+ FReplyTo: string;
FForwardHeaders, FRemail: boolean;
public
function CheckQuota(MailSize: longint): boolean; override;
function FinishDeliverMessage(LockID: longint): boolean; override;
function Lock: longint; override;
function Release(LockID: longint): boolean; override;
+ property ReplyTo: string read FReplyTo;
property ForwardHeaders: boolean read FForwardHeaders;
property Remail: boolean read FRemail;
end;
inherited Create(Name, Domain, Config, Slave, DefaultQuota);
Self.PhysicalMailbox:= PhysicalMailbox;
+ FReplyTo:= GetMailboxConfig(Config, Name, Domain, 'ReplyTo', '');
FForwardHeaders:= GetMailboxConfig(Config, Name, Domain, 'ForwardHeaders', true);
FRemail:= GetMailboxConfig(Config, Name, Domain, 'Remail', false);
Headers.Insert(0, 'X-Forwarded-To: ' + ForwardToList.DelimitedText);
end;
+ if ReplyTo <> '' then begin
+ if ReplyTo = '!' then
+ Headers.Insert(0, 'Reply-To: <' + Recipient + '>')
+ else
+ Headers.Insert(0, 'Reply-To: ' + ReplyTo);
+ end;
+
SpoolObject.Open;
for i:= 0 to Headers.Count - 1 do
SpoolObject.DeliverMessagePart(Headers.Strings[i]);