wsl でwindowsでmail コマンドを使う

Postfixからcygwin等でGmail経由でメールを送信するための設定メモ

  • ソフトを入れる apt-cyg install mailutils
    apt-cyg install postfix

PostfixからGmail経由でメールを送信するための設定メモ | あぱーブログ アプリパスワードがめんどくさい。

Windows 10 or 11 (WSL2)のUbuntuでsystemctlを利用する方法(systemdをPID1で動作させる方法) | Snow System

(3) Postfixの設定ファイルの最終行に以下の設定を追加。 vi /etc/postfix/main.cf

relayhost = smtp.gmail.com:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/gmail smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous smtp_sasl_mechanism_filter = plain smtp_use_tls = yes <<

  • 再起動 sudo systemctl enable --now postfix Linuxだと sudo service postfix restart

ログファイルは cat /var/log/maillog

divout でTEXで図がでないときの対応

divout でTEXで図がでないときの対応.
以下の通り 。

Ghostscript, GSView のインストール
1. option→setup parameters -> Graphic たどる。
2. gsx: C:/xxx/xxx/bin/gswin32c.exe を
gsx: C:/xxx/xxx/bin/gswin32c.exe -dDELAYSAFER に変更。
** オプション付ける     3. GIF: の選択をBMPに変更

Rのinstall.packages でCのコンパイラの都合でうまくいかない場合の対処

Rのinstall.packages でCのコンパイラの都合でうまくいかない場合の対処

基本

~/.R/Makevars を変えればよい。
例)


CXX11 = g++
CXX14 = gcc
など。

何を変えればいいかは、パッケージのソースをダウンロードしてきて、 src/Makevars をみて調べればよい。

divout でTEXで書いたドキュメントの図がでないときの対応

divout でTEXで書いたドキュメントの図がでないときの対応. タブ Option > Setup parameters > 「DVIOUTのプロパティ」 > タブ「Graphic」 > ボタン「gsx:」をクリックする 1)Goastscript をon に。 2)/bin/gswin32c.exe -dDELAYSAFER オプションをつける。

→divout の設定を書き換える必要あり。

rivernizi.shinobiashi.com

不完全ベータ関数(1-alpha,0,x)の漸近展開の実装の例

不完全ベータ関数(1-alpha,0,x)の漸近展開の実装の例 後半は部分分数分解やテーラー展開で積分

bx_real<-function(x,alpha){
    z<-x
    if(length(x[abs(x)>1])>=1){
        n<--log(0.00001,base=min(x[abs(x)>1]))
        str1<-0
        for(i in 0:n){
            str1<-str1+x[abs(x)>1]^-i/(i+alpha)
        }
        stra<-alpha*gamma(2-alpha)*gamma(-alpha)/(gamma(1-alpha)^2)*str1
        strb<-cos(pi*alpha)*gamma(2-alpha)*gamma(alpha)*x[abs(x)>1]^alpha
        z[abs(x)>1]<-1/(alpha-1)*x[abs(x)>1]^-alpha*(stra+strb)
    }
    if(length(x[abs(x)<1])>=1){

        n<-log(0.00001,base=max(x[abs(x)<1]))
        str1<-0
        for(i in 1:n){
            str1<-str1+(x[abs(x)<1]^i)/(i-alpha)
        }
        z[abs(x)<1]<-x[abs(x)<1]^(-alpha)*str1
    }

    if(length(x[abs(x)==1])>=1){

        z[abs(x)==1]<-Inf
    }


    -z
}

bx_int<-function(x,alpha0,N){
    alpha<-abs(alpha0)
    if(alpha0<0){
        str1<-log(x)
        for(k in 1:alpha){
            str1<-str1+ choose(alpha,k)*(N^(-k))/k*x^k

        }
        
    }else{
        
        if(alpha==0){
            str1<-log(x)

        }else{
            str1<-log(x)-log(abs(x+N))
            if(alpha>=2){
                for(k in 1:(alpha-1)){
                    str1<-str1-N^k/(-k)*1/(x+N)^k

                }
            }

        }

    }
    str1

}


i_bx0<-function(z,alpha){
        ans1<-NA
        f12<-function(x){bx(x,alpha)-z}
          try(x1<-uniroot(f12,c(0,1)))
        try(ans1<-x1$root)
        ans2<-NA
        try(x2<-uniroot(f12,c(1.001,10^6)))
        try(ans2<-x2$root)
        c(ans1,ans2)

}


th_y<-function(tt,r,alpha,x0,Y){
      t0<-bx(1+x0/Y,alpha)
    Y*(-1+i_bx0(t0-r*(tt),alpha))

}

th_t_real<-function(xx,r,alpha,x0,Y){
      t0<-bx_real(1+x0/Y,alpha)
    td<-bx_real(1+xx/Y,alpha)
    tt<-(td-t0)/r
    tt
}


th_t_int<-function(xx,r,alpha,x0,Y){
      t0<-bx_int(x0,alpha,Y)
    td<-bx_int(xx,alpha,Y)
    tt<-(td-t0)/r
    tt
}


th_t<-fuction(xx,r,alpha,x0,Y){


    if(!is.integer(alpha)){

        th_t_real(xx,r,alpha,x0,Y)
    }else{
        th_t_int(xx,r,alpha,x0,Y)

    }

    

}

[linux][cygwin]cygwin でemail を送信する設定の簡易版

セキュリティーは甘いが簡単な方法 (1)email コマンドを使う  email コマンドは送信だけの簡易コマンド

(2)設定は email-config で簡単に設定できる。 cygwin からメールを送る https://rcmdnk.com/blog/2013/11/15/computer-windows-cygwin/

https://rcmdnk.com/blog/2013/11/15/computer-windows-cygwin/

$ email-config Please enter your From: name (e.g., John Doe) : rcmdnk Please enter your From: email address : rcmdnk@gmail.com Please enter your Reply-to: email address : Enter 1 to use sendmail or 2 to use a SMTP server [1]: 2 Please enter the address of your SMTP server [127.0.0.1]: smtp.gmail.com Please enter the SMTP port number [25]: 587 Please select SMTP authentication (1 for none, 2 for LOGIN, 3 for PLAIN) [1]: 2 Please enter your SMTP username : rcmdnk@gmail.com Please enter your SMTP password :

Use TLS (true or false)? : true

(3)gmail の設定を行う (3-1) 2段階認証をoff (3-2) 安全性の低いアプリへのアクセスの管理をユーザーに許可する https://www.hc.itc.keio.ac.jp/ja/gmail_user_manual_mailer_security.html

[linux][cygwin]cygwin でemail を送信する設定の簡易版

セキュリティーは甘いが簡単な方法 (1)email コマンドを使う  email コマンドは送信だけの簡易コマンド

(2)設定は email-config で簡単に設定できる。 cygwin からメールを送る https://rcmdnk.com/blog/2013/11/15/computer-windows-cygwin/

https://rcmdnk.com/blog/2013/11/15/computer-windows-cygwin/

$ email-config Please enter your From: name (e.g., John Doe) : rcmdnk Please enter your From: email address : rcmdnk@gmail.com Please enter your Reply-to: email address : Enter 1 to use sendmail or 2 to use a SMTP server [1]: 2 Please enter the address of your SMTP server [127.0.0.1]: smtp.gmail.com Please enter the SMTP port number [25]: 587 Please select SMTP authentication (1 for none, 2 for LOGIN, 3 for PLAIN) [1]: 2 Please enter your SMTP username : rcmdnk@gmail.com Please enter your SMTP password :

Use TLS (true or false)? : true

(3)gmail の設定を行う (3-1) 2段階認証をoff (3-2) 安全性の低いアプリへのアクセスの管理をユーザーに許可する https://www.hc.itc.keio.ac.jp/ja/gmail_user_manual_mailer_security.html