mirror of
https://github.com/webmin/webmin.git
synced 2026-06-23 20:40:32 +01:00
Add support for the 'fo' tag in a DMARC record https://sourceforge.net/p/webadmin/bugs/5490/
This commit is contained in:
@@ -1280,6 +1280,14 @@ elsif ($type eq "DMARC") {
|
||||
$ruf =~ s/^mailto://;
|
||||
print &ui_table_row($text{'value_dmarcruf'},
|
||||
&ui_opt_textbox("dmarcruf", $ruf, 50, $text{'value_dmarcnor'}), 3);
|
||||
|
||||
print &ui_table_row($text{'value_dmarcfo'},
|
||||
&ui_select("dmarcfo", $dmarc->{'fo'},
|
||||
[ [ undef, $text{'default'} ],
|
||||
[ 0, $text{'value_dmarcfo0'} ],
|
||||
[ 1, $text{'value_dmarcfo1'} ],
|
||||
[ 'd', $text{'value_dmarcfod'} ],
|
||||
[ 's', $text{'value_dmarcfos'} ] ]));
|
||||
}
|
||||
elsif ($type eq "NSEC3PARAM") {
|
||||
# NSEC records have a hash type, flags, number of interations, salt
|
||||
|
||||
@@ -517,6 +517,11 @@ value_dmarcnop=Same as this domain
|
||||
value_dmarcaspf=Require strict SPF alignment
|
||||
value_dmarcadkim=Require strict DKIM alignment
|
||||
value_dmarcnor=Don't send
|
||||
value_dmarcfo=Failure reporting mode
|
||||
value_dmarcfo0=Report if DKIM and SPF failed
|
||||
value_dmarcfo1=Report if either DKIM or SPF failed
|
||||
value_dmarcfod=Report if signature evaluation failed
|
||||
value_dmarcfos=Report if SPF evaluation failed
|
||||
value_CAA1=Require enforcement?
|
||||
value_CAA2=Authorization type
|
||||
value_CAA3=CA domain name
|
||||
|
||||
@@ -863,7 +863,7 @@ if ($txt =~ /^v=dmarc1/i) {
|
||||
my $dmarc = { };
|
||||
foreach my $w (@w) {
|
||||
$w = lc($w);
|
||||
if ($w =~ /^(v|pct|ruf|rua|p|sp|adkim|aspf)=(\S+)$/i) {
|
||||
if ($w =~ /^(v|pct|ruf|rua|p|sp|adkim|aspf|fo)=(\S+)$/i) {
|
||||
$dmarc->{$1} = $2;
|
||||
}
|
||||
else {
|
||||
@@ -883,7 +883,7 @@ sub join_dmarc
|
||||
{
|
||||
my ($dmarc) = @_;
|
||||
my @rv = ( "v=DMARC1" );
|
||||
foreach my $s ("p", "pct", "ruf", "rua", "sp", "adkim", "aspf") {
|
||||
foreach my $s ("p", "pct", "ruf", "rua", "sp", "adkim", "aspf", "fo") {
|
||||
if ($dmarc->{$s} && $dmarc->{$s} ne '') {
|
||||
push(@rv, $s."=".$dmarc->{$s});
|
||||
}
|
||||
|
||||
@@ -415,6 +415,13 @@ else {
|
||||
$dmarc->{'ruf'} = $in{'dmarcruf'};
|
||||
}
|
||||
|
||||
if ($in{'dmarcfo'} eq '') {
|
||||
delete($dmarc->{'fo'});
|
||||
}
|
||||
else {
|
||||
$dmarc->{'fo'} = $in{'dmarcfo'};
|
||||
}
|
||||
|
||||
$vals = "\"".&join_dmarc($dmarc)."\"";
|
||||
}
|
||||
elsif ($in{'type'} eq 'NSEC3PARAM') {
|
||||
|
||||
Reference in New Issue
Block a user